Robert Casties <[EMAIL PROTECTED]> writes: > Rob wrote: >> Hi, >> Im trying to write a little app that uses the rasterizer to convert >> an >> SVG to a PNG. Obviously this is exactly what batik-rasterizer.jar >> does, however I want to be able to write a servlet and import >> org.apache.batik.apps.rasterizer.*, and then be able to rasterize the >> file on the fly. > > You can just use the rasterizer class directly. That way you have more > direct control. > > Here is a code sample from a servlet rasterizing SVG to PNG > (http://cvs.berlios.de/cgi-bin/viewcvs.cgi/digilib/servlet/src/digilib/servlet/Raster.java?rev=HEAD&content-type=text/vnd.viewcvs-markup): > > TranscoderOutput output = > new TranscoderOutput(response.getOutputStream());
I would consider rasterizing into a byte[] array and caching that to save some time in the future. -- Måns Rullgård [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]