Re: Need help with image events droplet to save multiple files as png
Re: Need help with image events droplet to save multiple files as png
- Subject: Re: Need help with image events droplet to save multiple files as png
- From: Luther Fuller <email@hidden>
- Date: Tue, 3 Jan 2006 09:08:53 -0600
Michael Cytrynowicz asked ...
Can someone help me with
...
on process_item(this_item)
tell application "Image Events"
launch
set thisImage to open this_item
scale thisImage to size 300
save thisImage as PNG in file new_path with icon
close thisImage
end tell
I think the problem is in the 'save ...' command. I had a problem
with this recently and found that I had to explicitly use the correct
extension in the file name to get 'save' to work properly. I know
it's redundant, but 'save' appears to have a problem understanding
what I want. So I used ...
tell application "Image Events"
launch
repeat with dropItem in fileList
set fileName to my getFileName(dropItem)
try
set theImage to open dropItem
if newType is "BMP" then
save theImage as BMP in file (fileName & ".bmp")
of destFolder
else if newType is "JPEG" then
save theImage as JPEG in file (fileName & ".jpg")
of destFolder
else if newType is "JPEG2" then
save theImage as JPEG2 in file (fileName &
".jp2") of destFolder
else if newType is "PICT" then
save theImage as PICT in file (fileName &
".pict") of destFolder
else if newType is "PNG" then
save theImage as PNG in file (fileName & ".png")
of destFolder
else if newType is "PSD" then
save theImage as PSD in file (fileName & ".psd")
of destFolder
else if newType is "TIFF" then
save theImage as TIFF in file (fileName &
".tiff") of destFolder
end if
... and it worked!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden