Assuming you have 1 bit raw image:
int transparency[] = {0, 0}; // or {1, 1} depending on the image
Image image = Image.getInstance(..., transparency);
Best Regards,
Paulo Soares
> -----Original Message-----
> From: Jerold Sampson [SMTP:[EMAIL PROTECTED]
> Sent: Monday, July 07, 2003 17:55
> To: Paulo Soares
> Subject: RE: [iText-questions] 1biit/bilevel iimages
>
> Thanks for the fast response.
>
> The source of the image data is a raw bitmap with scanlines padded to 1
> byte boundaries.
> We cannot convert the data to files. Some of the images originated with
> G4
> compression but
> they are not standard TIFF files but rather are embedded in a more complex
>
> file format.
>
> So I need to be able to add a bi-level image to the PDF where the white
> bits are transparent.
> Where the source of the image data is a byte array containing raw raster
> data and without
> creating temporary files.
>
> Thanks for your help,
> Jerold Sampson
>
>
> At 05:40 PM 7/7/2003 +0100, you wrote:
> >Using transparent gif or png will give you 1 bit transparency
> >out-of-the-box. If you are using raw images, or better yet G4 images, it
> can
> >also be done easily but it will depend on what you have to start with.
> >
> >Best Regards,
> >Paulo Soares
> >
> > > -----Original Message-----
> > > From: Jerold Sampson [SMTP:[EMAIL PROTECTED]
> > > Sent: Monday, July 07, 2003 17:17
> > > To: [EMAIL PROTECTED]
> > > Subject: [iText-questions] 1biit/bilevel iimages
> > >
> > > I have a requirement to place 1-bit, black and white images into my
> PDF
> > > documents in such a way that the white pels/pixels are transparent.
> > > Today I am accomplishing this using AWT indexed color images and
> > > specifiying transparency. The result is very large PDF. I would like
> > > to include the image as 1-bit and still accomplish the transparency
> > > that I require. Does someone know how to accomplish this? I would
> > > greatly appreciate any help or advice on how to do this.
> > >
> > > I have used the iText raw image support with 8 bit and 1 bit image
> data
> > > but have not been able to figure out how to specify or use
> transparency.
> > >
> > > The method I use today works but results in significanly larger PDF
> > > files because the result is PDF using the RGB color model. This
> > > is extreme overkill when the image source is 1-bit (black and white)
> > > image data.
> > >
> > > Thanks in advance,
> > > Jerold Sampson
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> > > Data Reports, E-commerce, Portals, and Forums are available now.
> > > Download today and enter to win an XBOX or Visual Studio .NET.
> > >
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> > > _______________________________________________
> > > iText-questions mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Jerold R Sampson
> TallPine Technologies, Inc.
>
> www.tallpine.com
> 303-415-1203
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions