xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Rendering quality (subsampling)
Date Thu, 22 Dec 2011 08:29:27 GMT
I'm not a specialist on these matters, but AFAIK Batik basically uses
the Java2D/Graphics2D infrastructure from Java which may have limitations
in this regard at least on some platforms (probably even depending on
the OS backend). Enlarging the canvas for painting and then downscaling
the resulting bitmap might actually not be the worst idea in this case.
But maybe I'm missing something.

On 14.12.2011 15:01:55 Steve Maher wrote:
> Hi,
> 
> I'm looking for a high-quality SVG renderer.  Batik's rasterizer seems to
> be the best out of the three I've tried, but I need it to do better.  I've
> tried all the image-rendering, shape-rendering, color-rendering hints
> without much (any?) change.  I've searched the source - mainly to try to
> increase any subsampling quantities - but had no luck.
> 
> I'm dealing with small circles that need to be rendered "correctly" for a
> custom projector in our lab at work.
> 
> For example, for a circle of radius .5 pixels (no stroke), and centered in
> the middle of a pixel (in other words, a circle touching the edges of a
> pixel), the rendered pixel intensity should be roughly PI/4 times the
> intensity of the circle (because the ratio of circle area to square area is
> PI/4).
> 
> Also, if I rotate the circle by 45 degrees (rotation centered on corner of
> pixel), there will be a 4 pixel square used to render the circle, with most
> intensity split between two adjacent pixels and much less intensity split
> between the other two adjacent pixels.
> 
> Batik comes close, but the intensity is high in the first case and in the
> second case, the intensity is not symmetric between the adjacent pixels
> (like the rotation wasn't exactly 45 degrees).
> 
> One option I am exploring is to artificially enlarge the scene, render by 1
> pixel circle across, oh, 100 pixels, and then shrink the image.
>  Effectively increasing the subsampling of the circle to determine pixel
> intensity.  I was hoping to be able to do that natively in the Batik source
> - or use some other SVG renderer.
> 
> Any tips are appreciated -
> 
> Regards,
> Steve




Jeremias Maerki


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