xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: How can I change the color model of an SVG image from RGB to CMYK and vice versa?
Date Fri, 17 Dec 2010 19:41:08 GMT
Olivier,
a question for you to begin with: do you know the difference between
calibrated and uncalibrated/device colors? I'm asking because when
people talk RGB or CMYK they very often mean uncalibrated/device colors.
That's not something that is useful except if you have the whole
printing workflow fully under control. Only in this case can you work
without color management. 

That said, an SVG image must always have sRGB colors (not true for
referenced bitmap images). Any other colors are always added as
alternatives that are taken if supported. Right now, SVG supports only
icc-color(), i.e. ICC-based calibrated colors. That way, it is possible
to define calibrated CMYK colors. AFAIK, SVGGraphics2D only generates
sRGB colors right now. So even if you specify an ICC-based Paint/Color on
the Graphics2D side, the color in SVG will end up being converted to
sRGB through Java's color management.

In the end, I believe that unless your application creates images that
need to be in exact colors (ex. CI/CD colors from a company, spot colors) for
a printing workflow, it doesn't make much sense to think about switching
between color models in the context of SVG. Just use sRGB. The printer
will then convert the sRGB to the printer's specific CMYK color space
through one single conversion (if the calibrated colors get preserved
through the whole workflow).

If the only thing you had in mind was converting some RGB value with a
fixed formula to CMYK (i.e. uncalibrated colors), you're better off just
working with sRGB.

http://en.wikipedia.org/wiki/Color_management

HTH

On 17.12.2010 17:24:34 olivierk wrote:
> 
> Hi, our web app let users download dynamically generated images in different
> formats, including SVG. Some of our users download the images for printing,
> thus we would like to allow them to choose between RGB or CMYK. Is there a
> way to specify the color model when creating an SVG image? If not, what is
> the default color model and how can I change it to another? Code snippets
> are welcome :)
> 
> Thanks,
> 
> Olivier.
> -- 
> View this message in context: http://batik.2283329.n4.nabble.com/How-can-I-change-the-color-model-of-an-SVG-image-from-RGB-to-CMYK-and-vice-versa-tp3092769p3092769.html
> Sent from the Batik - Users mailing list archive at Nabble.com.



Jeremias Maerki


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


Mime
View raw message