Skip to main content
Known Participant
January 7, 2025
Question

Script to set image compression LZW when saving files

  • January 7, 2025
  • 1 reply
  • 260 views

Is it not possible to set image compression to LZW when Photoshop stores tif files when the script runs the file? The script I tried kept reporting errors, as follows:   saveOptions.imageCompression = TIFFCompression.LZW;

1 reply

c.pfaffenbichler
Community Expert
Community Expert
January 7, 2025

Where did you get »TIFFCompression«? 

tifOpts = new TiffSaveOptions() ; 	
tifOpts.embedColorProfile = true; 	
tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
tifOpts.alphaChannels = false; 	
tifOpts.byteOrder = ByteOrder.MACOS;
tifOpts.layers = false ;
Known Participant
January 7, 2025

I used ChatGPT to make the code. Thank you very much for your reply, but after I tried it, the file disappeared after I closed it. It was not saved in the path folder I needed. Is it because my system is windows?