Wednesday, 16 November 2016

CODECs for images

  • The Image codecs is a method of compression/decompression of image files or image data. The codecs stands for Encoders / Decoders.
  • The various software image codecs are JPEG (JPG), GIF, PNG, BMP.The below figure shows the Encoding/Decoding concept.
  • These various Image codecs are technically differentiated from each other based on various factors which includes compression technology / algorithm, platform supported, sampling, OS supported etc. Codecs divided into two types Lossy and Lossless.

Lossy codecs

  • Lossy image codecs are JPEG and GIF when you performing on encoding and decoding on images we lose some quality of images.
1. JPEG (JPG)
    Encoding/Compressing
    Decoding/Decompressing
    Advanatges
    • JPEG codec has low complexity. Picture quality is generally good enough.
    • This is also memory efficient. i.e. good compression allows to reduce the file size.
    • It works very well for “slide-show” movies that have a very low frame rate.
    • Also it has reasonable coding efficiency.
    Disadvanatges
    • Single Resolution & Single Quality.
    • No target bit rate.
    • Blocking artifacts at low bit rate.
    • No lossless capability.
    • Poor error resilience.
    • No tiling & No regions of interest.
2. GIF
    Encoding/Compressing
    Decoding/Decompressing
    Advanatges
    • This codecs allows you to create transparent, interlaced, and animated graphics for the Web.
    • Compresses by scanning horizontally across a row of pixels and finding solid areas of color.
    • Indexes the pixels based on the 256 color palette in the file. No image information is lost.
    • The only graphic file format (codec) that is universally supported by all graphical browsers, regardless of version.
    • Most popular and versatile format for distributing color image on the Web.
    Disadvanatges
    • This codec is not good for photographic images due to its limited number of colors generally 256 colors.

Codecs for Lossless

  • Lossless codecs are PNG, BMP these are does not lose the data and quality when you are compressed.
1. PNG
    Encoding/Compressing
    Decoding/Decompressing
    Advanatges
    • A better compression than GIF codec, which only scans rows. The compression is ‘lossless’, you do not lose color information as you compress the file smaller. Typically compresses images 5-25% better than GIF.
    • It is a best one for creating complex live transparency, high-color graphics, and better compressed low-color graphics.
    • Designed to be network-friendly, so it is recognized and supported on all platforms.
    Disadvanatges
    • It doesn’t support animation.
    • It does not use predictive frames.
    • It has lower quality than PICT or TIFF.
2. BMP
    Encoding/Compressing
    Decoding/Decompressing
    Advanatges
    • Good photo quality.
    • Bitmap files (BMP) may be easily created from existing pixel data stored in an array in memory. Pixel values may be modified individually or as large groups by altering a palette if present.
    • Bitmap codecs may translate well to dot-format output devices such as CRTs and printers.
    Disadvanatges
    • Bmp codecs are Limited to RGB-images.
    • These codecs generally does not support effective image compression. They can be very large, particularly if the image contains a large number of colors.
    • It’s also not supported well across multiple platforms.
    • Shrinking this image codecs by decimation (throwing away pixels) can change the image in an unacceptable manner.

0 comments:

Post a Comment