concept raw image in category itext
appears as: raw image, raw images

This is an excerpt from Manning's book iText in Action, Second Edition.
Table 10.2. Image classes in iText
Classname
Subclass
Produces
Jpeg Yes The image is copied byte by byte into the PDF. Inspecting the PDF, you’ll find out that the DCTDecode filter can be used to decompress the data. DCT stands for Discrete Cosine Transform. Jpeg2000 Yes The filter used for these images is JPXDecode. This means that the image was encoded using the wavelet-based JPEG 2000 standard. ImgRaw Yes Raw images can either be compressed using zlib/flate compression or using the CCITT facsimile standard. See sections 10.2.2 and 10.2.3 for more details. GifImage No Although PDF supports images with LZW compression, iText decodes the GIF image into a raw image. If you create an Image with a path to a GIF file, you’ll get an instance of the ImgRaw class. PngImage No Just like GIF images, iText decodes PNG images into raw images. If the color space of the image is DeviceGray and if it only has 1 bit per component, CCITT is used as compression. In all other cases, the image data is zlib/flate compressed. BmpImage No Just like GIF images, iText decodes BMP images into raw images. Likewise, the filter in the image dictionary is FlateDecode. ImgTemplate Yes This is an image that consists of PDF syntax. If you look inside the PDF, you won’t find an image XObject, but a form XObject. In iText lingo, it’s a PdfTemplate wrapped in an Image object for reasons of convenience when scaling, rotating, and adding the image to the document. ImgWMF Yes If you create an Image using a WMF file, you’ll get an instance of ImgWMF, but internally the image will be translated into a PdfTemplate. Inside the PDF, you’ll find a form XObject instead of an image XObject. ImgCCITT Yes The filter for these images is CCITTFaxDecode. The data was encoded using the CCITT facsimile standard. It’s typically a monochrome image with 1 bit per pixel. See section 10.2.3. TiffImage No The TiffImage class will inspect the TIFF file and, depending on its parameters, it can return an ImgCCITT, an ImgRaw, or even a Jpeg instance. ImgJBIG2 Yes An ImgJBIG2 object is an Image instance produced by the JBIG2Image. In table 10.2, you’ll find some image types that don’t map directly to an image type in table 10.1. For instance, what do we mean when we talk about a raw image?