Re: GC Scale
Re: GC Scale
- Subject: Re: GC Scale
- From: Gnarlodious <email@hidden>
- Date: Mon, 28 Jan 2002 02:25:41 -0700
Entity Scott Earleywine spoke thus:
>
I tried the "on open/end open" around the first paragraph of you
>
code-snippet...the droplet didn't highlight when I drug an image over it.
Scott:
Did you have it something like this?
--This routine is designed to make a picture no wider than 576 or no higher
--than 432, whichever is smaller, while keeping the same proportions as the
--original. This is an 8x6 image. Note that compression is set to 90%
on open dropped
tell application "Finder"
try
set photo to dropped as alias list
on error
set photo to dropped as alias
end try
tell application "GraphicConverter PPC"
open the photo as alias
set the imageDims to the image dimension of window 1
set scaleFactor to my setScaleFactor(imageDims)
scale window 1 horizontal scaleFactor vertical scaleFactor
set JPEG quality of window 1 to "90"
save window 1 as JPEG with wwwready and makeCopy
close window 1
end tell
end tell
end open
on setScaleFactor(imageDims)
set the scaleFactor to 1
set the horiz to item 1 of the imageDims
set the vert to item 2 of the imageDims
if the horiz is greater than the vert then
if the horiz is greater than 576 then set the scaleFactor to 576 /
horiz
else
if the vert is greater than 432 then set the scaleFactor to 432 /
vert
end if
return the scaleFactor
end setScaleFactor
Rachel
http://www.gnarlodious.com
References: | |
| >Re: GC Scale (From: Scott Earleywine <email@hidden>) |