xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: [PATCH] Avoid tiling bitmaps for PDF and PS transcoders
Date Sun, 05 Sep 2004 10:56:19 GMT
Hi Jeremias,

Jeremias Maerki wrote:

> I'd like to propose a patch which changes the behaviour of
> GraphicsUtil.drawImage. By default, bigger images coming from filter
> effects, for example, are tiled and then rendered to the destination.
> I experienced ugly overlaps of these tiles within Acrobat Reader even
> though I can't make out any rounding errors in the code and the
> generated PDF code. 

    It looks like they aways push the images out to the nearest
pixel boundary. This ensures that the images touch in all cases
so you don't get 'drop outs'.  For opaque images this works great
but for transparent images (like your example) it generally causes
double opacity for 1 pixel on the edge at all zoom levels.

> So I changed GraphicsUtils so I can supply a
> RenderingHint from the PDF and PS Graphics2D implementations so these
> images get rendered in one step. A nice side-effect is that the
> resulting PDFs get a lot smaller.

    I must say that I am very surprised at this result, any idea
why it would be 1/2 as large?  How do you normally store images in the
PDF file?

> WDYT?

    There are a few trivial tweaks that I might make (the value should
be _ON, _OFF, _DEFAULT like the other Java2D rendering hints) but
generally it looks fine.


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


Mime
View raw message