I have thousands of uncompressed TIFFs that I want to save with LZW compression. I would use Batch in Photoshop, but these TIFFs are in scores or hundreds of separate folders. I want to use the Finder to find the TIFFs and drag them over a AppleScript file.
Will someone please write the script for me? All I need is a straight save, overwriting the TIFF, but with the LZW option enabled.
The specs of my system:
Mac OS X 10.4.11
Adobe Photoshop CS2
It should be easy, similar to a lot of other scripts I’ve written. This forum is for helping people write scripts though, if you want one written for your you might want to post it as a job and compensate the author for their experience and knowledge. See http://macfreelancer.com/
If you are new to AppleScript, this may take some time for you to figure it out. Have you looked into PhotoShop’s “Save Droplet” option under Automate. It will create a droplet icon that you can drag and drop files onto. That sounds like what you want the AppleScript to do. Just wanted to offer that as an alternative.
If you decide to go with an AppleScript, here is some code to get you started:
tell application "Adobe Photoshop CS3"
activate
open pathToTheTIFFFile
save current document in file (pathToTheTIFFFile) as TIFF with options {class:TIFF save options, image compression:LZW}
close current document without saving
end tell
These are the other save options you have for TIFF files, from the PhotoShop dictionary:
byte order (IBM PC/Mac OS) : Default value is ‘Mac OS’ when running on MacOS, and ‘IBM PC’ when running on a PC
embed color profile (boolean) : embed color profile in document
image compression (JPEG/LZW/none/ZIP) : compression type ( default: none )
interleave channels (boolean) : are the channels in the image interleaved? ( default: true )
JPEG quality (integer) : quality of produced image. Only valid for JPEG compressed TIFF documents ( 0 - 12 )
layer compression (RLE/ZIP) : should only be used when you are saving layers
save alpha channels (boolean) : save alpha channels
save annotations (boolean) : save annotations
save image pyramid (boolean) : ( default: false )
save layers (boolean) : save layers
save spot colors (boolean) : save spot colors
transparency (boolean)
Model: iMac Intel 10.5.5
Browser: Firefox 3.0.2
Operating System: Mac OS X (10.5)