PDA

View Full Version : writing CMYK-Files from QImage



hilby
21st July 2006, 08:32
Good Morning,

i search a way to write CMYK - Pictures (z.B. tiff).

I've tested TiffIO, it read wonderfull CMYK, but write this format not....

I've read, that it is possible to simulate CMYK over the RGBA - Values of a QImage, when set a flag (from RGBA to CMYK) after writing the File....but e can't found a concrete example about this :o(

have everybody an idee to solve this problem ?

I have yet asked Trolltech, but they don't know any way..

i need the CMYK-format for printing .

thanks for any help !
hilby

wysota
26th July 2006, 02:58
I don't think QImage can do that, it is strictly directed at 3 component colour handling.

Spockmeat
27th July 2006, 16:07
Can you just do the calculations yourself? If you want a whole write-up about color spaces, see here: http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html

For a short version, the formulas to convert between RGB and CMYK are:
Black=minimum(1-Red,1-Green,1-Blue)
Cyan=(1-Red-Black)/(1-Black)
Magenta=(1-Green-Black)/(1-Black)
Yellow=(1-Blue-Black)/(1-Black)