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
Hi,

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 ...
</svg>

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

Cheers
Tonny Kohar
-- 
Sketsa SVG Editor
imagine, design, create ...
http://www.kiyut.com

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


Mime
View raw message