Multimedia Technology Ch3

  • Uploaded by: Syed Fateh Ali Shah
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Multimedia Technology Ch3 as PDF for free.

More details

  • Words: 2,265
  • Pages: 11
[Multimedia Technology  ]

 

By: Zeeshan Bhatti 

[BS(IT) part III & part IV, Second  Semester]   

[Lecture Handout]  [Chapter 3]  [Graphics & Image Data]  [http://iict.usindh.edu.pk/zeeshan]   

[Institute of Information and Communication Technology,  University of Sindh, Jamshoro] 

Chapter 3: Graphics & Image Data  

Multimedia Technology  Chapter 3  Graphics and Image Data   

3.1 Graphical Images  Graphical images obviously play a very important role in multimedia pieces  • •

Images may be photograph‐like bitmaps, vector‐based drawings, or 3D renderings  Tools for image management focus on different kinds of images and converting between  formats peculiar to different tools and platforms 

 

3.2 Bitmap and Vector Images  Still images are generated in two ways: bitmaps (or raster‐based) or vector‐drawn 

3.2.1 Bitmap Images  A bitmap is a matrix describing the individual dots that are the smallest elements (pixels) of  resolution on a computer screen or printer or we can say a bitmap image is an array of logical  pixels. • • • • • • •

monochrome just requires one bit per pixel, representing black or white  8 bits per pixel allows 256 distinct colors, 16 bits per pixel represents 32K distinct colors, 24 bits  per pixel allows millions of colors  What’s the tradeoff? more bits provide more color depth, hence more photo‐realism,   o but require more memory and processing power  o Settling for just 256 colors forces someone to decide, which colors?  Graphics production software may capture in 24‐bit color and convert to 8‐bit  GIF and PNG formats use a 8‐bit color table allowing up to 256 colors  JPG preserves more color depth with 16 bits per pixel  Photoshop file (PSD) preserve 24 bits or more per pixel 

By: Zeeshan Bhatti   

Page 2 

Chapter 3: Graphics & Image Data  



Figure 3.1: A Bitmap Image

Figure 3.2: A Vector Image

 

3.2.2 Vector Images A vector-drawn image is created from geometric objects such as lines, rectangles, ovals, polygons using mathematical formulas ƒ Mathematical description of lines, curves and shapes ƒ Requires computation to determine logical pixels ƒ Compact, scalable, resolution independent and easy to edit ƒ Based on co-ordinates and algorithms ƒ Description is infinitely thin ƒ Computation chooses logical pixels ƒ Anti-aliasing to fix jaggies ƒ Basic blocks ƒ Squares, polygons, ellipses, lines, bézier curves… ƒ Easy to manipulate ƒ Scale, skew, rotate… •

e.g., RECT 0,0,300,200,RED,BLUE says (using Cartesian coordinates)  “Draw a rectangle starting at 0,0 (upper left corner of screen)  going 300 pixels horizontally right and 200 pixels downward,  with a RED boundary and filled with BLUE.” 

Figure: 3.3 A Vector image Showing Bezier Curve

By: Zeeshan Bhatti   

Page 3 

Chapter 3: Graphics & Image Data  

• •

Why might a vector‐drawn representation use less memory than a bitmap?  The first popular vector‐drawn images were for computer‐aided design (CAD)  such as AutoCAD, for aiding engineers and artists in creating complex renderings 



Graphic artists designing for print media use vector‐drawn objects because they put rectangles  and Bezier curves on paper without jaggies, exploiting high resolution printers  Macromedia Freehand, Corel Draw & Adobe Illustrator are vector‐drawing applications  o Macromedia Flash puts vector‐drawing on the Web with a plug‐in 

•  

3.2.3 Converting between bitmaps and vector‐drawn images:  •

 

Bitmap image editors convert vector‐based drawings to bitmaps by rasterizing   (Photoshop does this automatically) 

3.3 Graphic/Image Data This section introduces some of the most common graphics and image file formats. Some of them are restricted to particular hardware/operating system platforms, others are crossplatform independent formats. While not all formats are cross-platform, there are conversion applications that will recognize and translate formats from other systems. Most image formats incorporate some variation of a compression technique due to the large storage size of image files. Compression techniques can be classified into either lossless or lossy. We will study various video and audio compression techniques in the Next Chapters. Image Resolution: Image resolution refers to the number of pixels per inch area of an image. • Higher the resolution, means higher the number of pixels in that image hence better the quality but also with increase in file size. • Lower the resolution means less amount of pixels in an image and hence having poor quality with less file size. Aspect Ratio: Aspect Ratio means the ratio of file’s Width to its Height. For example 640 x 480 or 800 x 600 or 1024 x 768 • These number define the Width and height of an image but with a specific aspect ratio of 4:3 • all Monitors and Display systems fallow a particular aspect ratio i.e. 4:3, to display contents. • This 4:3 aspect ratio has been found to look natural on Monitors and other display systems. By: Zeeshan Bhatti   

Page 4 

Chapter 3: Graphics & Image Data  

3.3.1 Graphic/Image Data Structures A digital image consists of many picture elements, termed pixels. The number of pixels that compose a monitor image determine the quality of the image (resolution). Higher resolution always yields better quality. A bit-map representation stores the graphic/image data in the same manner that the computer monitor contents are stored in video memory.

Monochrome/ 1-Bit Images An example of 1-bit monochrome image is illustrated in Fig. 3.4 where: • Image consists of Pixels or Pel (Picture Element). • A 1-bit image consists of on and off bits only and thus is the simplest type of image. • Each pixel is stored as a single bit (0 or 1), or we can say that each pixel occupies exactly 1- Bit in memory. • Hence it is also referred to as a binary image. • Monochrome 1-bit images can be satisfactory for pictures containg onlysimple graphics and text.

Figure 3.4: Sample Monochrome Bit-Map Image

8-bit Gray-scale Images An example gray-scale image is illustrated in Fig. 3.5 where: • Each pixel is usually stored as a byte, occupying 8-bits in memory. • Each pixel has a grayscale value between 0 to 255, where 0 is for Black and 255 is used for White colors, as shown in figure 3.5a. • The Entire image can be thought of as a two-dimensional array of pixel values. We refer to such an array as a bitmap. • A 640 x 480 greyscale image requires over 300 KB of storage, as shown in figure 3.5.

Figure 3.5a: A Gray scale color representation

By: Zeeshan Bhatti   

Page 5 

Chapter 3: Graphics & Image Data  

Figure 3.5: Example of a Gray-scale Bit-map Image

We can think of the 8-bit images as a set of 1-bit bitplanes, where each plane consistes of a 1-bit representation of the image at higher and higher level of “elevation”: a bit is turned on if the image pixel has a nonzero value at or above that bit level. Figure 3.6b displays the concept of bitplanes graphically. Each bit-plane can have a value of 0 or 1 at each pixel but together, all the bitplanes make up a single byte that stores values between 0 and 255 (in this 8-bit situation)

Figure 3.6b: Bitplanes for 8-bit gray scale image

8-bit Colour Images An example 8-bit colour image is illustrated in Fig.3.6 where: • One byte for each pixel • Supports 256 out of the millions s possible, acceptable colour quality • Requires Colour Look-Up Tables (LUTs) • A 640 x 480 8-bit colour image requires 307.2 KB of storage (the same as 8-bit greyscale) Color Lookup Table(LUTs or CLUTs) The idea used in 8-bit color images is to store the index, or code value, for each pixel. Then, if a pixel stores, say, the value 25, the meaning is to go to row 25 in a color lookup table (LUT). For an 8-bit image, the image file can store in the file header information just what 8 bit values for R, G, and B correspond to each index. Figure 3.8 displays this idea. By: Zeeshan Bhatti   

Page 6 

Chapter 3: Graphics & Image Data  

The LUT is often called palette.

Figure 3.6: Example of 8-Bit Colour Image

24-bit Colour Images An example 24-bit colour image is illustrated in Fig. 6.14 where: • Each pixel is represented by 24-bit (three bytes).Each byte is for separate color channel i.e. RGB. •1 byte for Red has 255 shades of Red to White and similarly for other Green and Blue color. • Supports 256 x 256 x 256 possible combined colours (16,777,216) • A 640 x 480 24-bit colour image would require 921.6 KB of storage • Most 24-bit images are 32-bit images, the extra byte of data for each pixel is used to store an alpha value representing special effect information

Graphical Raster Devices • •

Raster displays and scanners Ink-jet, laser, electrostatic plotters, fax machines

By: Zeeshan Bhatti   

Page 7 

Chapter 3: Graphics & Image Data  

3.4 Standard System Independent Formats The following brief format descriptions are the most commonly used formats. Follow some of the document links for more descriptions.

GIF (GIF87a, GIF89a) • Graphics Interchange Format (GIF) devised by the UNISYS Corp. And Compuserve, initially for transmitting graphical images over phone lines via modems. • GIF standard is limited to only 8-bit (256) colour images, suitable for images with few distinctive colours (e.g., graphics drawing) • Supports interlacing. „ One byte per pixel „ GIF reduces colors to 256 (256 from 224 colors) By: Zeeshan Bhatti   

Page 8 

Chapter 3: Graphics & Image Data  

„ Uses a colour map of 256 possible RGB values, contained in file. Only the 8 bit index is transmitted for each pixel that contains the closest match color to th original one. „ Compression ratio is close to 3:1. Color table is transferred to the receiver. „ Provides support for animation - multiple pictures per file. „ Provides one dimensional interlacing dividing the image into 4 groups: first contains 1/8 of the image, second –1/8, third – ¼, last – 1/2. „ This is patented technology.

JPEG • A standard for photographic image compression created by the Joint Photographics Experts Group • Takes advantage of limitations in the human vision system to achieve high rates of compression. •JPEG allows the user to set a desired level of quality, or compression ratio (input divided by output). • Lossy compression which allows user to set the desired level of quality/ compression • Detailed discussions in next chapter on compression.

By: Zeeshan Bhatti   

Page 9 

Chapter 3: Graphics & Image Data  

PNG „ Portable Network Graphics (PNG) „ The PNG format is intended as a replacement for GIF in the WWW and in image editting. „ GIF uses LZW compression, which is patented by Unisys. All uses of GIF may have to pay royalties to Unisys - PNG contains no patented technology. „ PNG uses unpatented zip technology for compression „ Provides transparency using alpha value. „ 2 Dimensional interlacing. „ PNG of a single toucan overlaid to create a single picture. Notice how the shadows are overlaid on lower toucan. „ PNG supports multiple image layers, and adds an alpha byte to the RGB bytes to describe how to combine each pixel with pixels from other layers or other images, ranging from totally transparent to totally opaque.

„ Support for up to 48 bits of color information | a large increase. „ Files may contain gamma-correction information for correct display of color images, as well as alpha-channel information for such uses as control of transparency.

TIFF • Tagged Image File Format (TIFF), stores many different types of images (e.g., monochrome, greyscale, 8-bit & 24-bit RGB, etc.) –> tagged • Developed by the Aldus Corp. in the 1980’s and later supported by the Microsoft • TIFF is a lossless format (when not utilizing the new JPEG tag which allows for JPEG compression). • It does not provide any major advantages over JPEG and is not as user controllable it appears to be declining in popularity

Graphics Animation Files • FLC – main animation or moving picture file format, originally created by Animation Pro By: Zeeshan Bhatti   

Page 10 

Chapter 3: Graphics & Image Data  

• FLI – similar to FLC • GL – better quality moving pictures, usually large file sizes

Postscript/Encapsulated Postscript • A typesetting language which includes text as well as vector/structured graphics and bitmapped images • Used in several popular graphics programs (Illustrator, FreeHand) • Does not provide compression, files are often large

3.5 System Dependent Formats Many graphical/imaging applications create their own file format particular to the systems they are executed upon. The following are a few popular system dependent formats:

Microsoft Windows: BMP • A system standard graphics file format for Microsoft Windows • Used in PC Paintbrush and other programs • It is capable of storing 24-bit bitmap images

Macintosh: PAINT and PICT • PAINT was originally used in MacPaint program, initially only for 1-bit monochrome images. • PICT format is used in MacDraw (a vector based drawing program) for storing structured graphics

X-windows: XBM • Primary graphics format for the X Window system • Supports 24-bit colour bitmap • Many public domain graphic editors, e.g., xv • Used in X Windows for storing icons, pixmaps, backdrops, etc.

EXIF (Exchang Image File) is an image format for digital cameras: 1. Compressed EXIF _les use the baseline JPEG format. 2. A variety of tags (many more than in TIFF) are available to facilitate higher quality printing, since information about the camera and picture-taking conditions (flash, exposure, light source, white balance, type of scene, etc.) can be stored and used by printers for possible color correction algorithms. 3. The EXIF standard also includes speci_cation of _le format for audio that accompanies digital images. As well, it also supports tags for information needed for conversion to FlashPix (initially developed by Kodak).

By: Zeeshan Bhatti   

Page 11 

Related Documents


More Documents from ""