Re: GC Scale
Re: GC Scale
- Subject: Re: GC Scale
- From: Michelle Steiner <email@hidden>
- Date: Sun, 27 Jan 2002 07:06:32 -0700
On 1/26/02 10:51 PM, John McAdams <email@hidden> wrote:
>
the res stays at 72 and the print doesn't come out so good. I cannot
>
find an equivalent for "size" in GC's dictionary. Anyone have a way to
>
reduce the dimensions of an image and increase the resolution? I'd be
>
happy to hear it.
This is what I do; I haven't tried to print any of the photos, though.
This routine is designed to make a picture no wider than 640 or no higher
than 480, whichever is smaller, while keeping the same proportions as the
original.
--Michelle
(code to select photo goes here)
tell application "GraphicConverter"
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
save window 1 as JPEG with wwwready without makeCopy
close window 1
end tell
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 640 then set the scaleFactor to 640 / horiz
else
if the vert is greater than 480 then set the scaleFactor to 480 / vert
end if
return the scaleFactor
end setScaleFactor
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------