xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helder Magalhães" <helder.magalh...@gmail.com>
Subject Re: Turning antialiasing off in rasterizer
Date Thu, 17 Apr 2008 07:47:22 GMT
On Thu, Apr 17, 2008 at 5:54 AM, Jeff Moirano <jmoirano@gmail.com> wrote:
> Hello. I would like to rasterize SVG drawings to PNG without using
> antialiasing. I would like to preserve the RGB color information from the
> SVGs as closely as possible, and antialiasing adds new colors around the
> edges of the colored region boundaries- I would like all pixels in a colored
> region to have the same exact color profile in the finished PNG file.

I don't know if there's a way to force Batik rasterizer to do that,
but SVG has properties to control color rendering [1] and shape
rendering [2]. According to your case, I would recommend setting
shape-rendering="crispEdges" and color-rendering="optimizeQuality" in
the top level SVG element.

Hope this helps,

  Helder Magalhães

[1] http://www.w3.org/TR/SVG/painting.html#ColorRenderingProperty
[2] http://www.w3.org/TR/SVG/painting.html#ShapeRenderingProperty

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

View raw message