• 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: Pier Kuipers <email@hidden>
  • Date: Fri, 6 Jul 2001 22:44:42 +0100

At 09:19 -0400 6/7/01, Katherine Richmond wrote:
--- Simon Forster wrote:
I have a script which uses GraphicConverter to open up an image, resize it,
etc.
--- end of quote ---

Simon,

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?

Glad you brought up this topic. I also have a need to create same-size thumbnails, however, these need to be created on-the-fly from *large* files uploaded to a web server by my customers. A solution I'm working on uses GraphicConverter and Clip2Gif. Using AS, GraphicConverter creates an Icon for the file in question, using the very useful "size" parameter:

create icon FilePath size 110 with preview without sharpen

This will fit your preview inside a 110x110 pixel bounding box. Then on to Clip2Gif to extract the resulting PICT resource and save it in the required format. The script is really very simple, and looks something like:

-- Start with a routine to define FilePath and NewFilePath
tell application "GraphicConverter PPC"
try
create icon FilePath size 200 with preview
end try
tell application "clip2gif"
try
set thePict to get PICT resource of FilePath id 29876
on error -- need to get a better way to determine the PICT id...
set thePict to get PICT resource of FilePath id 256
end try
try
save thePict as JPEG in file NewFilePath quality high
end try
end tell
end tell

The only problem I have with this, is that creating the Icon with GraphicConverter ties up the processor for a considerable length of time (with files of 30MB this can take 20 seconds). Anybody any ideas on how to create a PICT without hugging the processor?

Hope this helps,

Pier.
--
Pier Kuipers
Visual ID
* the Media Asset Management solution *

2 Whitefriars
Aungier Street
Dublin 2
Tel. +353 1 476 7059
Mobile +353 87 294 3063
Fax +353 1 478 1366
ISDN +353 1 602 0754

http://www.visualid.com


  • Follow-Ups:
    • Re: how to script resizing in Graphic Converter
      • From: Andy Wylie <email@hidden>
  • Prev by Date: Re: Print Setup problems in Quark
  • Next by Date: Re: Insert Pages Doesn't Work In Acrobat 5.0
  • Previous by thread: Re: how to script resizing in Graphic Converter (Use QT)
  • Next by thread: Re: how to script resizing in Graphic Converter
  • Index(es):
    • Date
    • Thread