Saving multiple versions of a file

This area contains the messages from the old Yahoo gcmac group after the port.
Post Reply
c.sutherland@rocketmail.com
Posts: 0
Joined: Wed Mar 31, 2010 6:01 pm

Saving multiple versions of a file

Post by c.sutherland@rocketmail.com »

I am re-sizing and changing resolution of files for a website. There needs to be 3 different size jpg files from each master tif file. My script opens the master, makes the adjustments, saves the window as a new file name. Once the Window dimension and resolution are set to new values, how do I get the original unaltered image without re-opening the original file? The script currently runs this snippet of code three times, once for 185 px images, once for larger (as shown) and again for a downloadable higher res size. This seems pretty inefficient and there has to be a less cumbersome solution. Thanks for the help! Craig tell application "GraphicConverter" silentopen theFile tell window 1 set image bit depth to 16 set dim to image dimension set x to item 1 of dim set y to item 2 of dim if x > y then set item 1 of dim to 590 set item 2 of dim to y * (590 / x) else set item 2 of dim to 400 set item 1 of dim to x(590 / y) end if set image dimension to dim set IPTC reference to (7 as Unicode text) set IPTC category to "A" --set resolution to {72, 72} change resolution to {72, 72} with resample end tell save window 1 as JPEG in (savePath & "new_m.jpg" as Unicode text) with wwwready close window end tell
Post Reply