You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Matthias Reischenbacher <ma...@gmx.at> on 2014/01/28 22:09:36 UTC

SVG - embedded CMYK bitmaps

Hi,

I've noticed that JPEGs with DeviceCMYK color space, embedded in SVGs, 
are converted to sRGB when generating a PDF file. Does that happen with 
all kind of JPEG CMYKs? How are embedded bitmaps processed? Is that done 
by Batik and that's way its handled differently than normal 
fo:external-graphic CMYK-JPEGs?

Thanks for any clarification on this matter... I've attached a sample 
SVG file.

Best regards,
Matthias

Re: SVG - embedded CMYK bitmaps

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,

Batik provides SVG REC 1.1 support.
Unfortunately, CMYK is introduced in SVG 1.2 WD (see [1]).

[1] http://www.w3.org/TR/SVGColor12/#icc-colors

2014-01-28 Matthias Reischenbacher <ma...@gmx.at>:
> Hi,
>
> I've noticed that JPEGs with DeviceCMYK color space, embedded in SVGs, are
> converted to sRGB when generating a PDF file. Does that happen with all kind
> of JPEG CMYKs? How are embedded bitmaps processed? Is that done by Batik and
> that's way its handled differently than normal fo:external-graphic
> CMYK-JPEGs?
>
> Thanks for any clarification on this matter... I've attached a sample SVG
> file.
>
> Best regards,
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: SVG - embedded CMYK bitmaps

Posted by Luis Bernardo <lm...@gmail.com>.
Yes, by default JPEG CMYKs are converted to sRGB if the color profile is 
embedded in the image (I had not tried with JPEG CMYKs embedded in SVG 
but I think that also there the images are processed by FOP ). The 
reason this is done is due to the fact that the standard Java JPEG 
handling functions cannot handle CMYK. So FOP converts CMYK to sRGB to 
be able to embed the image with "acceptable" colors.

The solution is to use a ImageIO library that can handle CMYK in JPEGs. 
The "default" jai_imageio.jar cannot handle that either. The only one I 
know is the TwelveMonkeys ImageIo. I tested it with JPEGs and also TIFF 
and it worked well. See 
http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/201306.mbox/%3C51BA5640.1070101@gmail.com%3E.

On 1/28/14, 9:09 PM, Matthias Reischenbacher wrote:
> Hi,
>
> I've noticed that JPEGs with DeviceCMYK color space, embedded in SVGs, 
> are converted to sRGB when generating a PDF file. Does that happen 
> with all kind of JPEG CMYKs? How are embedded bitmaps processed? Is 
> that done by Batik and that's way its handled differently than normal 
> fo:external-graphic CMYK-JPEGs?
>
> Thanks for any clarification on this matter... I've attached a sample 
> SVG file.
>
> Best regards,
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: SVG - embedded CMYK bitmaps

Posted by Matthias Reischenbacher <ma...@gmx.at>.
Hi,

I just realized that CMYK-Bitmaps inside SVGs are handled correctly with 
FOP/Batik. No conversion is done to RGB. I didn't check my sample image 
enough, which was already in RGB. Sorry for the noise.

@Luis: I've successfully used JPEG-CMYKs with FOP in the past. TIFF-CMYK 
are more problematic so I'll give TwelveMonkeys a try if it comes up again.

Regards,
Matthias

On 28.01.2014 18:09, Matthias Reischenbacher wrote:
> Hi,
>
> I've noticed that JPEGs with DeviceCMYK color space, embedded in SVGs, 
> are converted to sRGB when generating a PDF file. Does that happen 
> with all kind of JPEG CMYKs? How are embedded bitmaps processed? Is 
> that done by Batik and that's way its handled differently than normal 
> fo:external-graphic CMYK-JPEGs?
>
> Thanks for any clarification on this matter... I've attached a sample 
> SVG file.
>
> Best regards,
> Matthias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org