I found that setting the rasterizer "-indexed" parameter to 1 effectively turns off anti-aliasing as it forces there to be only 2^1=2 colors in the result PNG image:
java -jar batik-rasterizer.jar -indexed 1 The indexed parameter is not listed on the rasterizer web docs: http://xml.apache.org/batik/svgrasterizer.html#using But it is listed when running the rasterizer at the command line: "-indexed (1|2|4|8) Reduces the image to given number of bits per pixel using an adaptive pallete, resulting in an Indexed image. This is currently only supported for PNG conversion." Regards, Rob --- Thomas DeWeese <[EMAIL PROTECTED]> wrote: > Robert McKinnon wrote: > > > Is it possible to turn anti-aliasing off when using the Batik SVG > > rasterizer to convert SVG to PNG? > > The easiest way to do this is to add > 'shape-rendering="crispEdges"' > to the outermost SVG element, this can be done as part of the > transcoding processes if you can't change the SVG source directly. > > > If yes, how can I turn anti-aliasing off. > > > > If no, does anyone know a way (preferably at the unix command line) > to > > change all non-white pixels in a raster image to black. > > > > More details: > > - Attached is a portion of a PNG generated by the Batik > rasterizer. > > - Via shellscript I am feeding PNGs into a tracing tool that > generates > > a nice beizer curve SVG of the solid regions. > > - The tool is not recognizing Monaco (the three pixels on the > left) > > because it is not solid black. > > - Hence I want to turn anti-aliasing off. > > > > Regards, > > Rob __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]