xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tonny Kohar" <tonny.ko...@gmail.com>
Subject Re: Transcoding images: they result cutted
Date Mon, 19 Nov 2007 09:12:56 GMT

On Nov 19, 2007 2:57 PM, Amanda Fernandez Redondo <jaipi83@gmail.com> wrote:
> Hi, I've tried both choices and the jpeg image always results 400x400:
> t.addTranscodingHint(SVGAbstractTranscoder.KEY_MAX_HEIGHT, new
> Float(canvas.getHeight()));
> t.addTranscodingHint(SVGAbstractTranscoder.KEY_MAX_WIDTH , new Float
> (canvas.getWidth()));
> Rectangle aoi = new Rectangle(0, 0, canvas.getWidth(), canvas.getHeight());
> t.addTranscodingHint(SVGAbstractTranscoder.KEY_AOI, aoi);
> I've checked also the size of my canvas and it's 900x600 (more or less), so
> I think that the only solution may be resizing the canvas before transogind
> it. Can I do that? How wil be the best code to do that??
> Thank vey much.

Hmm, very strange problem. What is the content of your svg width,
height and viewbox attribute on the the svg tag ?

<svg width="???" height="????" viewBox="????" ...>
... your svg content ...

You can set the any supported element attribute using standard DOM API
call setAttributeNS(...) to change the value eg: width,height, or

Tonny Kohar
Sketsa SVG Editor
imagine, design, create ...

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

View raw message