• 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: Scaling large images w/ Akua Sweets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scaling large images w/ Akua Sweets


  • Subject: Re: Scaling large images w/ Akua Sweets
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 23 Oct 2001 08:35:06 -0700

On 10/22/01 10:55 PM, Chris Adams <email@hidden> wrote:

>Here is a technique that uses Quicktime and applescript to scale (in pixels)
>and save images.

Here's a script that scales horizontal pictures to 640 wide, and vertical
pictures to 480 tall (exept if the photo is smaller than 640 by 480),
using GraphicConvertor; it processes a folder full of pictures at a time.
Almost all digital cameras use a 4 to 3 ratio for image dimensions.

set the folderToProcess to choose folder
tell application "Finder"
set the photoList to (the files of the folderToProcess)
end tell
repeat with photo in the photoList
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
end repeat

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. |
----------------------------------------------------------------------


  • Prev by Date: Re: OSX: handy handler - making backslash characters in a file path in order to pass it to the shell
  • Next by Date: Re: AppleScript to get UserName!??
  • Previous by thread: Re: Scaling large images w/ Akua Sweets
  • Next by thread: Re: Scaling large images w/ Akua Sweets
  • Index(es):
    • Date
    • Thread