Re: PS7, Resizing according to image orientation
Re: PS7, Resizing according to image orientation
- Subject: Re: PS7, Resizing according to image orientation
- From: Michael Cytrynowicz <email@hidden>
- Date: Fri, 24 Jan 2003 18:37:21 -0800
Steen,
The correct syntax is "image current document", so the script works if you
change it to:
tell application "Adobe Photoshop 7.0"
activate
if width of current document is greater than height of current document
then
resize image current document width pixels 100
else
resize image current document height pixels 100
end if
end tell
Hth,
Mike Cytrynowicz
........................................................................
Steen asked:
>
Hi!
>
>
I'm trying to produce a script that'll take a folder with images and make
>
them ready for a website.
>
I'm having some trouble though. The images can at no time be larger than 100
>
pixels, in any direction. So I figure I need a script that'll check the
>
orientation of the image, and resize it correspondingly...
>
>
For instance if my original is a 300 x 600 pixel image, I want it to be 50 x
>
100 when my script have run.
>
>
Here's a cutout of my script:
>
--
>
tell application "Adobe Photoshop 7.0"
>
activate
>
if document (width of document) is greater than (height of document)
>
then
>
resize image width pixels 100
>
else
>
resize image height pixels 100
>
end if
>
end tell
>
--
>
...it fails with an errormessage saying "Can't get width of document".
>
>
Can anyone tell me what I'm doing wrong?
>
>
Thank you very much in advance,
>
best regards,
>
>
Steen Villumsen
_______________________________________________
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.