I thought this got answered yesterday... Did you not like the answer(s)?
Leonard -----Original Message----- From: jhart [mailto:jhartd...@gmail.com] Sent: Monday, February 23, 2009 1:51 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] Adding Images with Transparency Hi, Our application captures one (or more) digital signatures and adds them onto a PDF template. The only file output options from the signature pad manufacturer (Topaz) are BMP & JPG, so we're using a black & white JPG. I'm able to dynamically add the images onto the document, but I need the white pixels to be transparent so overlapping signatures won't obscure each other. I tried using SetTransparency() to no avail, which makes sense since JPG's don't contain any transparency information. I'm thinking I should be able to use my image as a mask onto itself (since it's already black & white), but am confused about the parameters when creating the mask image. Here's what I'm trying: // signature1 is a byte array which contains the JPG image Image sig1 = Image.getInstance(signature1); Image mask1 = Image.getInstance(2100, 1600, 1, 8, signature1); mask1.makeMask(); sig1.setImageMask(mask1); sig1.scaleToFit(200, 75); cbStamperOverContent.addImage(sig1, 200, 0, 0, 75, 0, nYPos, true); Any help would be appreciated. Thanks, Joe -- View this message in context: http://www.nabble.com/Adding-Images-with-Transparency-tp22167605p22167605.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php