(no subject)
(no subject)
- Subject: (no subject)
- From: Joe Ragosta <email@hidden>
- Date: Sun, 19 Jan 2003 21:00:47 -0600
I have a problem Applescript and can't figure it out. I'd appreciate
help from someone in this list.
I have a folder full of jpg files that I've scanned of my kids. They're
in different sizes and shapes, but I'd like them all scaled to the size
of my desktop (currently 1280x1024). The following script seems to work
OK for landscape pictures, but crops those in portrait layout.
What's wrong with it?
Thanks.
------------------------------------------------------------------------
--------------------------------
property target_width : 1280
property target_height : 1024
on open input_files
set target_folder to choose folder with prompt "Pick a folder in
which to save images:"
tell application "Image Capture Scripting"
repeat with current_image in input_files
tell application "Finder" to set file_name to (name of item
current_image)
set current_image to open current_image
if the height of the current_image is greater than or equal to
width of the current_image then
scale the current_image to size target_height
else
scale the current_image to size target_width
end if
save current_image in file ((target_folder & file_name) as
text)
close current_image
end repeat
end tell
end open
------------------------------------------------------------------------
--------------------------------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.