I purchased ImageInfo for OS X and think it is pretty cool, but I have a question for anyone who is familiar with it. When I get the image color mode I want the data to be a string, but anytime I try to coerce it to a string it turns out as <<constant ****cmyk>>. Occasionally it will work and return just CMYK like I want. Is there a way that I can get the results I want more consistantly?
What type of result is being returned for color mode? If it’s a record or list, you might need to jump through some hoops to coerce/convert it to a string.
What happens if you take the coercion out of the Image Info tell block? This would take it out of Image Info’s namespace where, hopefully, it isn’t viewed as a constant.
tell application "Image Info"
set theMode to image color mode of (Image Info for alias "path:to:some:file")
end tell
set theMode to theMode as text