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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to