Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created February 3, 2022 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/abe8021bfde0f9b25ef4382498d03d60 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/abe8021bfde0f9b25ef4382498d03d60 to your computer and use it in GitHub Desktop.
Compress PSD to Reduce File Size Programmatically in Java
// Load an input PSD file
PsdImage image = new PsdImage("Input.psd");
// Create an instance of PsdOptions to set compression method
PsdOptions psdOptions = new PsdOptions();
psdOptions.setCompressionMethod(CompressionMethod.RLE);
// Save compressed PSD image file
image.save("PSDcompression.psd", psdOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment