Monday, March 29, 2010

Color Space Conversions -- Do Them...

We have some image processing code that only works on files in LAB or in our proprietary format that we want to turn into a Photoshop filter plugin, so RGB, CYMK, or other formats will have to be converted before the image processing code can work on them, and then converted back to the user's format.



In this situation, is it best to:



1. Get Photoshop to do the conversions using an automation plugin.



2. Use some simpler method than an automation plugin that will get Photoshop to always deal with the plugin in a specified format.



3. Do the conversions yourself in the filter, and use a PiPL to limit the formats that will be accepted by the filter.



4. So something else.



5. Forget the whole idea.



Vincent
Color Space Conversions -- Do Them...
Hi Vincent. I use Lab colour for my plug-ins. It's pretty easy to convert to this colour space from RGB or CMYK or grayscale. You'll want to use some or all of the following callbacks, depending on what image depths you're converting to and from:



sPSColorSpace-%26gt;Convert8to16 (converts 8-bit data to 16-bit data)

sPSColorSpace-%26gt;Convert16to8 (converts 16-bit data to 8-bit data)

sPSColorSpace-%26gt;Convert16 (converts between colour spaces for 8-bit data)

sPSColorSpace-%26gt;Convert8 (converts between colour spaces for 16-bit data)



(You'll probably also want to use the PiPL to filter out those other weird colour spaces like duotone and multichannel.)



-- Matthew
Color Space Conversions -- Do Them...
Hi Matthew,



I meet a problem about convert 16 bits per pixel to 8 bits per pixel. I tried to use APIs:

sPSColorSpace-%26gt;Convert16to8 (converts 16-bit data to 8-bit data)

sPSColorSpace-%26gt;Convert8 (converts between colour spaces for 16-bit data)



But I can not get the right image after converting. Could you give me the detail instruction (step by step) to implement this API.



Thanks so much,



Hieu Nguyen.

Hi Matthew and All,



I meet a problem about convert 16 bits per pixel to 8 bits per pixel. I tried to use APIs:

sPSColorSpace-%26gt;Convert16to8 (converts 16-bit data to 8-bit data)

sPSColorSpace-%26gt;Convert8 (converts between colour spaces for 16-bit data)



But I can not get the right image after converting. Could you give me the detail instruction (step by step) to implement this API.



Thanks so much,



Hieu Nguyen.

I have problem in converting XYZ to RGB and back to XYZ.

I have XYZ values (95.59131427,99.81228861,107.3272762).

I used standard formula for converting it to RGB as (255,254,253)

Then i converted this RGB back to XYZ and got the result as (94.4277,99.2604,107.1700).

Can any one let me know why recalculated XYZ value is not equal to the original XYZ value?

Here are the links for the formulas which i have used for the conversions:

http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html



Thanks in advance for your help.



Santhosh

%26gt;I have problem in converting XYZ to RGB and back to XYZ.

%26gt;I have XYZ values (95.59131427,99.81228861,107.3272762).

%26gt;I used standard formula for converting it to RGB as (255,254,253)



What ''standard formula''? If you mean those on the web site you

references, is your RGB data definitely sRGB?



%26gt;Then i converted this RGB back to XYZ as (94.4277,99.2604,107.1700).



How?



%26gt;Can any one let me know why recalculated XYZ value is not equal to the original XYZ value?



You rounded data to less than 3 significant figures on conversion. Of

course when you use an inverse formula you will have lost accuracy.

This looks within the normal range of inaccuracy.



Alternatively, the formula you found on the web site (how do you know

it is trustworthy?) is not exactly inverted.



Aandi Inston

i should advise you to have a look at this http://www.acasystems.com/en/color-picker/faq-cmy-color.htm

No comments:

Post a Comment