2012.02.22 20:33 "Re: [Tiff] Creating a CMYK tiff", by Igor Skochinsky
Wednesday, February 22, 2012, 9:22:29 AM, you wrote:
TIFFSetField(image, TIFFTAG_SAMPLESPERPIXEL, 4);
/* When I use separate plans, the tiff cannot be opened, but I don't think contig is good here!! */ //TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_SEPARATE); TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
It's been a while since I worked with this, but from what I remember, none of the common viewers supported planar CMYK. If you want max compatibility, you'll have to pack your pixels 4 colors per sample.
Now, I have 4 buffers of LZW data:
Where do these buffers come from? If you don't have raw buffers, you'll have to unpack them first and reshuffle the data.