Re: Image Events can't see Gray color space
Re: Image Events can't see Gray color space
- Subject: Re: Image Events can't see Gray color space
- From: kai <email@hidden>
- Date: Tue, 10 Apr 2007 05:06:40 +0100
On 9 Apr 2007, at 19:58, Timothy Wilkinson wrote:
The basic script is this:
set theFile to (choose file)
tell application "Image Events"
launch
set this_image to open theFile
copy the color space of this_image to theColor
close this_image
end tell
display dialog theColor as string
This works well on images that are either RGB or CMYK. However,
any image
that is Grayscale returns an error saying "The variable theColor is
not
defined".
Image Events is supposed to tap into the SIPS architecture, Timothy;
I guess something just got lost in the translation.
For an alternative, perhaps you could try something like:
-----------
set theFile to POSIX path of (choose file of type "public.image"
without invisibles)
set theColor to text 10 thru -1 of paragraph 2 of (do shell script
"sips -g space " & quoted form of theFile)
-----------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden