Re: crop left half of image via script / iMagine Photo
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