xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: JPEGTranscoder: Bad quality - JPEG is displaced
Date Wed, 02 Apr 2008 11:17:43 GMT
Hi Hans,

news <news@ger.gmane.org> wrote on 03/28/2008 08:48:47 AM:

> I transcode a SVG into a JPEG using the JPEGTranscoder. I set the quality
to
> 1.0 (maximum) and the resolution to 300 dpi.

   How are you setting the JPEG quality?

> Quality
> -------
> The qualitiy of the JPEG is bad, especially the texts (fonts). What can I

> do?

   So if you are really setting the JPEG quality it may be something
you just have to live with.  Even with quality set to 1.0 JPEG is
lossy.  For vector graphics PNG is really a much better choice as it
doesn't have ringing problems around high frequency edges.

> JGEP is truncated
> ------------------
> In my SVG I have a black frame around the SVG. When I transcode it to a
> JPEG, the frame, and the whole SVG, is displaced. I mean the content from

> the SVG is moved to the top and to the left. I can see a white space on
> bottom and right where the frame should be.
>
> What could be wrong?
> Is there a workaround?

    This sort of truncation is almost always caused by incorrectly
set viewBox and width/height attributes (mostly commonly the viewBox).

> By the way: I have the same problem when I trabscode the SVG with the
> PDFTranscoder from FOP. Is something in my SVG wrong?

    Most likely your viewBox on the root SVG element.
Mime
View raw message