• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: GC Scale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC Scale


  • Subject: Re: GC Scale
  • From: Scott Earleywine <email@hidden>
  • Date: Sun, 27 Jan 2002 22:43:50 -0600

Michelle,

This may seem extremely trivial, but I cannot get your code, and do not
understand how to get your code, to be 'drop-able'.

That is, I'd like to drop an image (no matter what the format...'cause GC
can open them all), a selection of images, or a folder of images, onto your
script and have GC do the work.

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.

I'm stuck...can you help me?

Thanks,
SLE

--
Scott Earleywine
email@hidden
http://homepage.mac.com/earleywine/

> From: Michelle Steiner <email@hidden>
> Date: Sun, 27 Jan 2002 07:06:32 -0700
> To: <email@hidden>
> Subject: Re: GC Scale
>
> 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. |
> ----------------------------------------------------------------------
> _______________________________________________
> 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.


  • Follow-Ups:
    • Re: GC Scale
      • From: Gnarlodious <email@hidden>
  • Prev by Date: Re: Scripting E'rage
  • Next by Date: Re: Newbie. How to find numbers after....
  • Previous by thread: Re: GC Scale
  • Next by thread: Re: GC Scale
  • Index(es):
    • Date
    • Thread