Re: Image Events
Re: Image Events
- Subject: Re: Image Events
- From: Axel Luttgens <email@hidden>
- Date: Fri, 4 Feb 2011 10:40:23 +0100
Le 3 févr. 2011 à 23:02, robert.d.burbank a écrit :
> [...]
>
> It seems to me that putting
>
> embed with source profile
> "/Users/home/Library/ColorSync/Profiles/AdobeRGB1998.icc"
>
> Between the open command and the save command it should work. I get the
> below error. I have been fussing with this and just about every thing I can
> think of but i can not seem to get Image Events prefered way of delivering
> the profile. Any help?
>
> error "Image Events got an error: Can’t get profile
> \"Users:home:Library:ColorSync:Profiles:AdobeRGB1998.icc\"." number
> -1728 from profile
> "Users:burbr0ir:Library:ColorSync:Profiles:AdobeRGB1998.icc"
Hello Robert,
As Ed alreay noticed, the "embed" command should be targeted to the image.
Running this one here:
tell application "Image Events" to get profiles
--> {profile "Adobe RGB (1998)", profile "Lightness Increase", profile "BJ Color Printer Profile 2000", profile "Web Safe Colors", profile "Lightness Decrease", profile "Display", profile "Black & White", profile "Generic CMYK Profile", profile "Generic Gray Profile", profile "Generic Gray Gamma 2.2 Profile", profile "Generic Lab Profile", profile "Generic RGB Profile", profile "Generic XYZ Profile", profile "sRGB IEC61966-2.1", profile "Blue Tone", profile "Gray Tone", profile "Sepia"}
it appears that Image Events loads several profiles from various locations (or settings, such as printers).
So, it seems you just need to ensure that Image Events has located and loaded the profile you want to use; once this is done, you may embed that profile into an image.
For example:
tell application "Image Events"
set Img to open "~/Desktop/someimage.jpg"
embed Img with source profile "Generic RGB Profile"
save Img
close Img
end tell
seems to be fully functional here.
That said, either its dictionary is somewhat imprecise, or its object model is a bit fuzzy, and there is possibly more than one way to do it with System events...
HTH,
Axel
_______________________________________________
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