You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Brigette Muller <br...@coxtarget.com> on 2001/07/23 16:56:49 UTC

PDFImages & CMYK JPEGS

Hi all,

	I am currently adapting the PDFRenderer / PDFGraphics2D to deal
with (only) CMYK. I have it all working EXCEPT for CMYK jpeg images.
	(I can get RGB images into my doc, but my Graphics folks will
not accept this...).
	I can load my CMYK image into a BufferedImage using
com.sun.image.codec.jpeg.JPEGImageDecoder (the
sun.awt.image.JPEGImageDecoder does not recognized the CMYK). When I get
to the part where I need to create the PDFImage from this, I am stuck.

	The RGB version appears to takes the int (8bits/pixel) pixels,
and then masks them out to R, G, & B bytes, tripling the size of the
image.
	Can anyone tell me what the mask for CMYK at 8bit/pixel is? Or
alternatively, how would I create a PDFImage from the BufferedImage (or
Raster) of the 8bit/pix CMYK image? I'd rather not expand the image
beyond its natural size, but if I have to I will.

	On a side note, is it possible to include a PDF within a PDF
with the PDF classes currently available in FOP?

	tia
	Brigette

Re: PDFImages & CMYK JPEGS

Posted by Jeremias Maerki <je...@outline.ch>.
Hi Brigette

> 	I am currently adapting the PDFRenderer / PDFGraphics2D to deal
> with (only) CMYK. I have it all working EXCEPT for CMYK jpeg images.
> 	(I can get RGB images into my doc, but my Graphics folks will
> not accept this...).
> 	I can load my CMYK image into a BufferedImage using
> com.sun.image.codec.jpeg.JPEGImageDecoder (the
> sun.awt.image.JPEGImageDecoder does not recognized the CMYK). When I get
> to the part where I need to create the PDFImage from this, I am stuck.
> 
> 	The RGB version appears to takes the int (8bits/pixel) pixels,
> and then masks them out to R, G, & B bytes, tripling the size of the
> image.
> 	Can anyone tell me what the mask for CMYK at 8bit/pixel is? Or
> alternatively, how would I create a PDFImage from the BufferedImage (or
> Raster) of the 8bit/pix CMYK image? I'd rather not expand the image
> beyond its natural size, but if I have to I will.

While you're at it, you might want to have a look at the URL below.
There's code on how to integrate a JPEG as is (DCT) into PostScript. The
implementation in PDF (chapter 4.8.9 in PDF 1.3) is very similar. That
would make the images even smaller, it might let you circumvent yourproblem
and you would make a lot of people happy. :-)

http://www.pdflib.com/jpeg2ps/

Sorry for not being very helpful otherwise.

Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org