• 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: crop left half of image via script / iMagine Photo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crop left half of image via script / iMagine Photo


  • Subject: Re: crop left half of image via script / iMagine Photo
  • From: Kevin Meaney <email@hidden>
  • Date: Wed, 15 Jun 2005 07:29:02 +0100

Gert,

On 15 Jun 2005, at 07:07, Gert van Oss wrote:

Thanks Kevin,
your iMagine Photo suggestion works like a charm. Maybe you could give me an example of code where I want to crop for example 21 pixels from the left, 22 from the top, 23 from the right and 24 from the bottom of a file. My result until now where I crop the left and the bottom is below. I just can't get the grip on the grid
Thanks again.
Grt



Try this:

set chosenFile to choose file
tell application "iMagine Photo"
set thisImporter to import graphic chosenFile
set theprops to the properties of thisImporter
set {x, y, theWidth, theHeight} to the natural bounds of theprops
set the source rectangle of thisImporter to {21, 22, theWidth - 23, theHeight - 24}
tell thisImporter to make exporter with properties {export file type:"JPEG", export folder location:path to desktop folder, export file name:(file name of theprops), export custom icon:true, export compression quality:high, export resolution:{72.0, 72.0}}
export thisImporter
close thisImporter
end tell


Kevin

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: crop left half of image via script (From: Kevin Meaney <email@hidden>)
 >Re: crop left half of image via script / iMagine Photo (From: Gert van Oss <email@hidden>)

  • Prev by Date: Re: crop left half of image via script / iMagine Photo
  • Next by Date: Re: Applescript for 7 year Installation!
  • Previous by thread: Re: crop left half of image via script / iMagine Photo
  • Next by thread: Applescript for 7 year Installation!
  • Index(es):
    • Date
    • Thread