Created attachment 24590 [details] CMYK color images patch for PS Renderer When trying to generate a PostScript output with CMYK images (JPG/Tiff), the PS renderer converting color space to RGB. Please find the attachments for the test case and the CMYK images as well.
Created attachment 24591 [details] Input FO file
Created attachment 24592 [details] CMYK JPG image
Created attachment 24594 [details] CMYK Tiff Image
Please find that the code changes are in XMLGraphicsCommons project, the patch should be applied to XMLGraphicsCommons and the 'xmlgraphics-commons-1.4svn.jar' should be placed in FopTrunk/lib to get the desired output.
Created attachment 24595 [details] Postscript output file after the changes Please find the CMYK color space with the output file after the patch applied. like ... %AXGBeginBitmap: C:\mywork\JavaXSLTSamples\XSLFOSamples\cmykimage.jpg {{ /RawData currentfile /ASCII85Decode filter def /Data RawData << >> /DCTDecode filter def /DeviceCMYK setcolorspace << /Decode [1 0 1 0 1 0 1 0] /Width 500 /BitsPerComponent 8 /ImageType 1 /DataSource Data /ImageMatrix [500 0 0 300 0 0] /Height 300 >> image } stopped {handleerror} if RawData flushfile } exec
So the code was basically already there (due to the JPEG CMYK support) and only had to be enabled. Your patch could actually be further simplified. The check for the component count is not necessary as that is done inside ImageEncodingHelper already. Patch applied: http://svn.apache.org/viewvc?rev=884159&view=rev Thanks!
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed