Actually, this is so simple, I've created a patch. I'm hesitant to apply
it without much testing with various PNGs for which I have no time right
now. But maybe one of you can take a look. If it's good JAIImage and
JimiImage could be similarly patched.

On 19.12.2006 23:01:36 Jeremias Maerki wrote:
> It turns out the following revision is responsible for the regression:
> http://svn.apache.org/viewvc?rev=424349&view=rev
> 
> Putting the Commons codec before the ImageIO variant in ImageFactory is
> a quick fix for this. I originally switched because of speed reasons but
> obviously I didn't test PNGs with alpha channel.
> 
> The reason why Martin's PNG doesn't work with the ImageIOImage class is
> the lack of support for java.awt.Transparency.TRANSLUCENT. If it were a
> BITMASK it would work. The same problem exists for JAIImage and
> JimiImage, BTW. Again, this is something a complete redesign of the
> image package would have addressed. It's on my higher priority list but
> I still haven't got to it, yet. If someone wants to try to implement
> that little code that is missing as a temporary fix, please do. It
> shouldn't be difficult. You can maybe use XmlGraphicsCommonsImage for
> hints.
> 
> On 19.12.2006 20:30:35 Andreas L Delmelle wrote:
> > On Dec 19, 2006, at 19:56, Peter wrote:
> > 
> > > When working on the patch I certainly can not remember coming  
> > > anywhere close
> > > to code that could have an influence on how png's get into the pdf.
> > 
> > I was also a bit puzzled, since in the patch there are no explicit  
> > references to anything png-related (IIC, png-related stuff is already  
> > put in Commons for that matter, so it couldn't have been touched  
> > directly by the patch)
> > 
> > OTOH, this was the only significant change to the codebase between  
> > 13.11 and now, so one can reasonably assume that the cause is in  
> > there somewhere... I'd expect something which has an impact on the  
> > interaction with the commons-lib?
> > 
> > 
> > Cheers,
> > 
> > Andreas
> 
> 
> 
> Jeremias Maerki



Jeremias Maerki

Attachment: imageIOImageTransparencyPatch.txt
Description: Binary data

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

Reply via email to