• 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
Workaround - Image Events can't see Gray color space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Workaround - Image Events can't see Gray color space
      • From: kai <email@hidden>
  • Prev by Date: Re: Finder - List - Question
  • Next by Date: Re: Workaround - Image Events can't see Gray color space
  • Previous by thread: finder - List - Question
  • Next by thread: Re: Workaround - Image Events can't see Gray color space
  • Index(es):
    • Date
    • Thread