Hi,

On Mon, 2006-07-10 at 11:44 -0700, DanMan wrote:
> Im using the batik java API to convert svg to png. I need to be able
> to set the output resolution of the png images. I have searched all
> over the javadoc but not found out how to do it. My current javacode:
> String svg = "...svg data ..."; PNGTranscoder t = new PNGTranscoder();
> TranscoderInput input = new TranscoderInput( new StringReader(svg) );
> FileOutputStream fout = new FileOutputStream("tempname");
> TranscoderOutput output = new TranscoderOutput(fout);
> t.transcode(input, output); fout.close(); Best regards, Daniel 

You could use various hint for the transcoder eg:


t.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH, new Float(width));
        t.addTranscodingHint(SVGAbstractTranscoder.KEY_HEIGHT, new
Float(height));
        t.addTranscodingHint(SVGAbstractTranscoder.KEY_MAX_WIDTH, new
Float(width));
        t.addTranscodingHint(SVGAbstractTranscoder.KEY_MAX_HEIGHT, new
Float(height));

There are quite a few hints available including area of interest, etc

> 
> ______________________________________________________________________
Regards
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to