Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
ASStudio and ColorSync-Dev combined quest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ASStudio and ColorSync-Dev combined quest



Hi all,

I9m throwing myself in a heavy quest again, but based on the fantastic
support I already received here it9s my idea that it9s possible.

I want to try to have Colorsync do a color matching function with color
numbers (like RGB or CMYK).
Because Colorsync scripting can only do color matching functions with
images, I need to have some C code as well for the matching function.
In my case I want to convert CMYK colors to CIE-Lab.

Therefore, I9m posting this on the Applescript-Studio list and the
ColorSync-Dev list simultaneously.


The first part is to parse multiple variables to C via the call method. This
can be something like this:
--
set MyCMYKProfile to "Demo_CMYK.icc" -- this can also be a path if needed
in C
set MyRenderingIntent to "Absolute Colorimetric"
set My_C to 40.51
set My_M to 30.29
set My_Y to 30.75
set My_K to 0.00
set MyReturnedInfo to call method "CallWithVariables:" with parameters
{MyCMYKProfile, MyRenderingIntent, My_C, My_M, My_Y, My_K}
--


The next step is to create a Colorsync function in C, which does the actual
color matching function, based on the variables parsed from Applescript.
This step is devided into two sections:
* Have the parsed variables from Applescript available to C (somebody at the
ASStudio list?)
* Let Colorsync do a color matching function with those variables (somebody
at the Colorsync-Dev list?)

- (NSString*)CallWithVariables:(NSString *)MyCMYKProfile, etc., etc. /*
need all the parsed variables from applescript here */
{

/* initialize the parsed variables here? */

/* have Colorsync do a color matching function with the parsed variables
here, returning CIE-Lab coordinates (Result) here? */


return [NSString stringWithFormat:@"\n%2.2f 2.2f 2.2f", Result[0],
Result[1], Result[2]]; /* the CIE-Lab coordinate in a string */
}


So, for my first questions on this:
* Is there anyone at the ApplescriptStudio list who can help me with the
code for the parsed variables (Wes, perhaps?)
* Is there anyone at the ColorSync-Dev list who can provide some C-code for
the Colorsync matching function (Roger, Graeme?)

I know this might a heavy one but if succesful, an important missing
function in Colorsync can be solved (I hope).


Thanks in advance for any response/ideas on this!


Erik Koldenhof
_______________________________________________
colorsync-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/colorsync-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.