xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Stoessel" <hstoessel.l...@pm-medici.ch>
Subject Re: JPEGTranscoder: Bad quality - JPEG is displaced
Date Mon, 07 Apr 2008 05:57:53 GMT

I have try it with PNG. The font is also bad, like in the JPG format.


  <thomas.deweese@kodak.com> schrieb im Newsbeitrag news:OFB7DC6B64.A4156032-ON8525741F.003D94F5-8525741F.003E0BE7@knotes.kodak.com...
  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.

View raw message