Multimedia Systems Part 5

Mahdi Vasighi www.iasbs.ac.ir/~vasighi

Department of Computer Science and Information Technology, Institute for Advanced Studies in Basic Sciences, Zanjan, Iran Image Formats

PNG o Portable Network Graphics o Developed in early 1995 as an alternative to GIF o Three advantages over GIF • Alpha channel (up to 16 bits) • Gamma correction • 2D Interlacing Image Formats - PNG

Interlacing o Adam7 algorithm • operates in both dimensions • uses seven passes and through each 8 × 8 block of an image Image Formats - PNG

Interlacing

Pass 1 Pass 2 Pass 3 Pass 4 1/64 = 1.5625% 1/32 = 3.125% 1/16 = 6.25% 1/8 = 12.5%

Pass 5 Pass 6 Pass 7, 1/4 = 25% 1/2 = 50% 1/1 = 100% Image Formats - PNG

Interlacing

ADAM7 Pass 4 Row-wised Pass 1 1/8 = 12.5% 1/8 = 12.5% PNG GIF

GIF pixels have an 8-to-1 aspect ratio, whereas PNG pixels are 2-to-1 Image Formats - PNG

Interlacing

ADAM7 Pass 5 Row-wised Pass 2 1/4 = 25% 1/4 = 25% PNG GIF

GIF pixels have an 4-to-1 aspect ratio, whereas PNG pixels are 1-to-1 Image Formats - PNG

PNG GIF interlacing interlacing Image Formats - PNG

PNG • Supports up to 16 bits per pixel in each color channel • Supports lossless compression • Does not support multiple image format/ animation like GIF

• embedded textual information • title • author's name • description Image Formats

JPEG • Standard method of compressing photographic • Widely used image format • Joint Photographic Experts Group • Compression is lossy

• allows the user to set a desired level of quality

• For a Quality factor 75%, JPEG achieves image size around 6% of original size Image Formats - JPEG

JPEG Preprocessing

1. partition the image into blocks of size 8 x 8 pixels

2. subtract 127 from each pixel intensity in each block Image Formats - JPEG

JPEG DCT Preprocessing

Discrete Cosine Transformation Transformation Image Formats - JPEG

JPEG Preprocessing

Transformation make decisions about values in the transformed image

Quantization • elements near zero will converted to zero • All quantized values will then be rounded to nearest integers. Image Formats - JPEG

JPEG Preprocessing

Transformation

Quantization

quantization matrix for a quality of 50% Image Formats - JPEG

JPEG • Huffman coding algorithm

Preprocessing The original image: 1602408 = 307,200 bits Coded image: Transformation 85,143 bits

~70% less storage space than that of the Quantization original image!

Encoding

Original Compressed Image Formats - JPEG

JPEG

Issues and Problems • Decoupling • Loss of information Original

Compressed Image Formats - JPEG

JPEG

What about colors?

• convert the RGB space channels to YCbCr space

• each color component as would be compressed as a separate image. Image Formats

TIFF

• Tagged Image File Format • Developed by Aldus Corporation in the 1980s • Support for attachment of additional info. (Tag) • was originally a lossless format • platform independent • universal to software programs • can store many different types of images • are divided into sections with a different data type Image Formats

Other formats

• EXIF (Exchange Image File) • WMF (Windows Meta File) • BMP () • PTM (Polynomial Texture Mapping)