Hi batik users, We are currently using Batik to provide SVG support for a print application sometimes requiring CMYK colors.
I surely understand that Batik has not been written with other color types than RGB in mind and after researching the list I found that Batik will have problems with other colors than RGB if color filters are applied. But as long as it is used in an controlled environment without color filtering it should be usable, right? Currently I run into the problem that the PaintServer convertICCColor method always converts colors into RGB colors and the information about the ICC Color Profile is lost during this process. > float[] rgb = profileCS.intendedToRGB(colorValue); > return new Color(rgb[0], rgb[1], rgb[2], opacity);*/ I'd like to ask what the rationale is behind this behavior? As far as I understand it conversion to RBG not using the provided profile is currently only necessary if the "relative-colorimetric" rendering intend is set. Since Java does support ICC color profiles, I'm currently investigating whether returning a color referencing a Color Space and making use of the profile's toRGB method if the rendering intend is not "relative-colorimetric" instead. > return new Color(profileCS, colorValue, opacity); Only for "relative-colorimetric" currently a conversion is necessary. Alternatively I could imagine to overwrite the toRGB method if Batik's ICCColorSpaceExt class and make it point to it's intendedToRGB method. This way batik would still return a color object with the correct intended RBG color but the underlying application the SVG is rendered into still has access to the color profile of the color if no conversion was necessary. We still would lose the color profile information if any other type of color conversion (including any type of filters) would be applied but only then. Is this an approach that seems feasible? Or am I totally wrong? Any feedback? Best regards, Ludger -- Dipl.-Inf. Ludger Bünger Product Development Senior Software Engineer RealObjects GmbH --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
