Hi Michael,

mlindeboom <[EMAIL PROTECTED]> wrote on 08/03/2006 06:20:54 PM:

> I am using the Batik API to convert an SVG image to JPEG. The SVG images
> contains text of various fonts like Chinese. I want to scale the SVG 
image
> to be 80% of its original size before converting to JPEG. I am assuming 
that
> is is best to scale the SVG before conversion because JPEG does not 
scale
> very well. However, the text in the resulting JPEG image seems to be 
skewed
> or blurry.

   There are many potential causes for the 'blurry' text.  The simplest
is just that the font doesn't fall as nicely on the pixel grid at the
new size (so more pixels are anti-aliased).

   As for what gives the best quality for a small size reduction (like
your case) you are better off rescaling before rasterization.  However,
all vector graphics engine use approx. for real pixel coverages.

   So the very best output could be achieved by rendering several times 
the
desired final output size (2,3,4x) and using a _high_quality_ resample
operation to downsample the image to the final size (talking at least
cubic, perhaps some form of truncated sinc).

   Doing this right requires some signal processing understanding 
(or a prebuilt library) and done wrong will give worse results.  It
also makes rasterization take many times as long.

> PS code is below

    The code looks fine.


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

Reply via email to