Created
January 22, 2025 02:26
-
-
Save conholdate-gists/802df8ead2431806dbc8bd2ea850e962 to your computer and use it in GitHub Desktop.
Compress PSD in Java | Optimize PSD Photoshop File Size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load a PSD file | |
com.aspose.psd.Image image = com.aspose.psd.Image.load("sample.psd"); | |
// Define the compression method | |
com.aspose.psd.imageoptions.PsdOptions options = new com.aspose.psd.imageoptions.PsdOptions(); | |
options.setCompressionMethod(com.aspose.psd.fileformats.psd.CompressionMethod.Raw); | |
// Save compressed PSD image | |
image.save("compressed.psd", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment