Workaround - Image Events can't see Gray color space
Workaround - Image Events can't see Gray color space
- Subject: Workaround - Image Events can't see Gray color space
- From: Timothy Wilkinson <email@hidden>
- Date: Wed, 11 Apr 2007 08:32:11 -0400
- Thread-topic: Workaround - Image Events can't see Gray color space
After doing some deeper digging I found out that the Image Events addition
is based on the command line app SIPS. After doing a "man sips" I came up
with the following script that seems work just fine with all of the color
spaces. I'm sure it can be tightened up with more work but it gets the job
done.
set theFile to (POSIX path of (choose file))
set theColorSpace to (do shell script "sips -g space " & theFile)
set oldDelims to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to ":"
set theColor to text item 2 of theColorSpace as text
set AppleScript's text item delimiters to oldDelims
on error
set AppleScript's text item delimiters to oldDelims
end try
display dialog theColor
Hope someone else finds this useful.
Tim
--------------------------------------
Tim Wilkinson
Lab Manager
ITC-ACHS
University of Virginia
email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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