Hello,
I am using itext 2.0.4 which is really a cool library.
But I have a problem with the following version of drawImage in
PdfGraphics2D:
boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int
sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
It seems that when the input Image has transparency (like a
BufferedImage of type TYPE_INT_ARGB), this method removes alpha information.
It's probably because it makes internally a temporary BufferedImage with
the pixel format TYPE_BYTE_BINARY.
There is no problem with other versions of drawImage like:
boolean drawImage(Image img, int x, int y, ImageObserver observer)
This may be related to
http://sourceforge.net/mailarchive/message.php?msg_id=loom.20070426T142627-378%40post.gmane.org
I don't have the source for the library that makes the call to the wrong
drawImage(), I just pass a Graphics2D, so it is no easy to fix.
Moreover the constructor of PdfGraphics2D is not public.
I have found a workaround: create proxy Graphics2D to wrap an existing
PdfGraphics2D , so that the wrong drawImage() can be patched.
Is there an other solution?
Will this problem be fixed in a next release of itext?
Thanks.
Arnaud
begin:vcard
fn:Arnaud Masson
n:Masson;Arnaud
org:KIKA Medical;R&D
adr:;;;Nancy;;54000;France
email;internet:[EMAIL PROTECTED]
x-mozilla-html:TRUE
url:http://www.kikamedical.com
version:2.1
end:vcard
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/