Page 57 - DCAP303_MULTIMEDIA_SYSTEMS
P. 57

Unit 4: Image



            As it can be seen from this table, large 24 bit images will result in very large files. This is why   notes
            compression becomes important. There are a large number of file formats used for storing
            compressed bitmaps from the trival to the very complicated. The complicated formats exist because
            of the very large bitmap files that would exist, if compression was not used. There are two broad
            categories of compressed file format, those which are lossless (retain the bitmaps perfectly) and
            those which are lossy. The following shows the main hierarchy of compression techniques (See
            Figure 4.15).

                             figure 4.15: Hierarchy of Compression techniques















            The crudest way of reducing the size of bitmap files is to reduce the colour information; this is
            called bit reduction or quantization. For example, one could convert 24 bit bitmaps to 8 bit indexed
            bitmaps using dithering to simulate the lost colours. The most common lossy format by far is JPEG,
            a description of how it works is well outside the scope of this discussion. Its main advantage is
            that it can offer vastly better compression ratios than the lossless formats. For example, consider
            the following bitmap the original of which is 500 × 350 pixels at 24 bit colour. Using the formula
            given earlier the uncompressed file size is 500 × 350 × 24 / 8 / 1024 = 513 K (See Figure 4.16)

                                     figure 4.16: Uncompressed file















            Saved in greyscale (bit depth reduction) the file is 171 K (3 times smaller), saved and compressed
            using RLE, it is 388 K (75% of the original), saved using LZW compression, it is 188K (36% of the
            original), saved as JPEG, it is 30 K (a compression ratio of 17 : 1). The following is a description of
            the simplest lossless compression technique called run length encoding (RLE) that is used with
            good effect for bitmaps with only a few colours. Consider the following small, 17 × 10 pixel, and
            8 bit image (See Figure 4.17).

                                        figure 4.17: 8 Bit image














                                             LoveLy professionaL University                                    51
   52   53   54   55   56   57   58   59   60   61   62