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

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
References: 
 >Image Events can't see Gray color space (From: Timothy Wilkinson <email@hidden>)

  • Prev by Date: Re: Image Events can't see Gray color space
  • Next by Date: AFP mount
  • Previous by thread: Re: Image Events can't see Gray color space
  • Next by thread: Re: Image Events can't see Gray color space
  • Index(es):
    • Date
    • Thread