A mask must be bw or grayscale. I doubt that you can find a gif with those characteristics.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Wednesday, December 01, 2004 10:57 PM > To: [EMAIL PROTECTED] > Subject: [iText-questions] image masking > > I am trying to take one image and create a mask for another > image but seem > to be getting a parsing error when the PDF is generated. > Below is a snipet > of the code. > > //Two tone mask: black and white. > Image mask= Image.getInstance(new URL("http://"+imageURL+"mask.gif")); > mask.makeMask(); > mask.setInvertMask(true); > > Image pic = Image.getInstance(new URL("http://"+imageURL+"pic.gif")); > pic.setImageMask(mask); > doc.add(pic); > > Am I missing something? > > Do I need to convert the mask object to > Image temp= Image.getInstance(new > URL("http://"+imageURL+"mask.gif")); > byte[] maskArray = temp.getOriginalData(); > Image mask = Image.getInstance(widthOfMask, heightOfMask, 1, 1, > maskArray); > > > Is there any code example with a mask .gif and picture .gif > > Thank you > Casildo > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from > real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
