I had exams last month and I am feeling a bit rusty with applescript. I have 100 images. I want to change their resolution to 400x300. Please give me a script or tell me what I should use?
Hi,
look at http://macscripter.net/viewtopic.php?id=17240
I searched for the keyword sips, which is the shell command to manipulate images
A Photoshop option might look like this:
--set OriginalPath to choose folder with prompt "choose folder for the files to convert."
--set SavePath to choose folder with prompt "choose folder to save the converted files to."
--tell application "Finder" to set FileList to every file of OriginalPath as alias list
tell application "Adobe Photoshop CS3"
with timeout of 300 seconds
set display dialogs to never
activate
set ruler units of settings to pixel units
--repeat with AFile in FileList
-- open AFile showing dialogs never
tell current document
set DocName to name
flatten
if mode is not RGB then change mode to RGB
if (bits per channel is sixteen) then set bits per channel to eight
resize image width 400 resolution 72 resample method bicubic sharper
--close saving yes
end tell
--end repeat
end timeout
end tell
note: some lines commented out for testing, it’s been a while since I used this one and it used percents instead of pixels.
Thanks for the replies. I do not have Photoshop. The “sips” command should do it for me.