• 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: how to script resizing in Graphic Converter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to script resizing in Graphic Converter


  • Subject: Re: how to script resizing in Graphic Converter
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 6 Jul 2001 08:27:17 -0700

On 7/6/01 6:19 AM, Katherine Richmond <email@hidden>
wrote:

>Would you please share the script that you use to resize an image? I
>looked in the GraphicConverter dictionary and saw only a scale command.
>What I need is a resize to make my thumbnails all 110 pixels wide. Can you
>help with this?

The scale command actually resizes the picture. So, here's a script that
will do it for you:

property targetwidth : 110
tell application "GraphicConverter"
activate
set currentwindow to window 1
set dimensions to (image dimension of currentwindow)
set scalefactor to my computeRatio(dimensions)
scale currentwindow horizontal scalefactor vertical scalefactor
end tell

to computeRatio(numberToScale)
set originalwidth to item 1 of numberToScale
set scalefactor to targetwidth / originalwidth
return scalefactor
end computeRatio

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: osaxen loaded into memory
  • Next by Date: Re: Insert Pages Doesn't Work In Acrobat 5.0
  • Previous by thread: Re: how to script resizing in Graphic Converter
  • Next by thread: Re: how to script resizing in Graphic Converter
  • Index(es):
    • Date
    • Thread