xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Djioev <al...@socialchange.net.au>
Subject SVG to PNG
Date Thu, 26 Jul 2001 08:19:16 GMT

Hello All,

A have a chunk of code which converts SVG to PNG:
  PNGTranscoder pngTranscoder = new PNGTranscoder();

pngTranscoder.addTranscodingHint(PNGTranscoder.KEY_XML_PARSER_CLASSNAME,

"org.apache.xerces.parsers.SAXParser");


		TranscoderInput svgInput = new TranscoderInput(new
ByteArrayInputStream(value));

		ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
                TranscoderOutput imageOutput = new
TranscoderOutput(outStream);

	try {
         	pngTranscoder.transcode(svgInput, imageOutput);
	   } catch (Exception e) {System.out.println ("can't transform SVG
to PNG."); };



It works and looks good for me, but I also want to define somewhere the
size of the output PNG image (width/height). Is it possible somehow to
implement?



-- best regards,
	Alexandre Djioev


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


Mime
View raw message