IMA C2 -Graphics

Introduction to Multimedia Applications - Graphics

Overview

  • This lecture covers graphic concepts and formats within multimedia applications.

  • It aims to enable students to identify graphic concepts, discuss multimedia graphic elements, and calculate compressed graphic file sizes.

Key Terms (4)

  • Bitmap Graphic: A graphic composed of pixels.

  • Vector Graphic: A graphic defined by mathematical formulas.

  • Graphic Resolution: The level of detail in a graphic.

  • Graphic File Format: The structure in which a graphic is stored.

Definition of Graphics

  • A graphic, also called a still image, contains no movement or animation.

  • It underlies the display of text and animation.

    • Text is a type of graphic.

    • Animation is made up of many graphics.

Sources of Graphics (6)

  • Scanning: Digitizing pictures from non-digital mediums using a scanner.

  • Digital Camera: Capturing graphics from the external world.

  • Graphics Software: Creation of graphics on a computer by an illustrator.

  • CD-ROM Collections: Clipart and PhotoCDs.

  • Websites: Commercial and amateur websites.

  • Computer Programs: Generating graphics from data (charts, flow charts, pie-charts).

Types of Graphics (2)

  • Bitmap Graphic: Also called Dots graphic or Raster graphic.

  • Vector Graphic: Also called Line graphic or Object-Oriented graphics.

Bitmap Graphic

  • Made up of many dots (pixels) arranged in a matrix.

  • Pixels: Picture Elements.

  • Each pixel records Red, Green, and Blue (RGB) values.

  • Pixels merge optically to produce the impression of continuous tones.

Bitmap Graphic (Resolution)

  • Quality is highly affected by Resolution.

  • Resolution: How finely a device approximates continuous graphics using finite pixels.

  • Common ways to specify resolution:

    • Dot per inch (dpi)

    • Pixel dimension (e.g. 640 x 480 pixel)

  • Example: A graphic's resolution may be 600 dpi, meaning it has 600 dots per inch.

  • Higher resolution means finer image quality.

  • Disadvantages of high-resolution graphics:

    • Occupy more disk space.

    • Take longer to transfer over a network.

Bitmap Graphic File Size Calculation

  • Graphic size (in bytes) == (height x width x color depth)/8(height \, x \, width \, x \, color \, depth) / 8

  • Color depth: Also called color resolution; measures the number of bits of stored information per pixel, indicating how many colors can be displayed.

  • Example: A full-screen graphic resolution (640 x 480 pixels) at an 8-bit color will yield the following file size: (640 x 480 x 8)/8=307200(640 \, x \, 480 \, x \, 8) / 8 = 307200 bytes.

Vector Graphic

  • Graphic is stored as a mathematical formula.

  • Displaying a vector graphic requires computation to generate the graphic.

  • Example: The equation of a straight line is y=mx+cy = mx + c. If the line passes through (x<em>1,y</em>1)(x<em>1, y</em>1) and (x<em>2,y</em>2)(x<em>2, y</em>2), then m=(y<em>2−y</em>1)/(x<em>2−x</em>1)m = (y<em>2 - y</em>1) / (x<em>2 - x</em>1) and c=(x<em>2y</em>1−x<em>1y</em>2)/(x<em>2−x</em>1)c = (x<em>2y</em>1 - x<em>1y</em>2) / (x<em>2 - x</em>1).

Bitmap vs Vector Graphic

  • Why Use Bitmap Graphic?

    • Can produce photo-realistic graphics.

    • Can produce background textures.

    • Does not require a special software player to read.

    • Standard graphic format.

    • Many software tools support Bitmap graphic like GIF and JPEG files.

    • No processing is necessary before displaying bitmap graphics.

  • Disadvantage of Bitmap Graphics

    • Large size, leading to excessive download times.

    • For 2-D graphics only.

    • Resolutions of different devices vary. For example, iMac has a resolution of 96 dpi, and PC monitors have a resolution of 72 dpi. Bitmap graphics will exhibit different sizes when displayed on devices in different resolutions.

  • Why use Vector graphics?

    • Compact.

    • Relatively small amount of data required to represent the graphic.

    • Scaleable

    • Resolution-independent

    • Easy to edit

    • Vector techniques are mandatory for 3-D graphic

  • Disadvantage of Vector Graphic:

    • Absence of standard format for vector graphics on the Web.

    • Displaying vector graphic requires some software to translate it into a displayable form. For instance, to display Flash movie, Flash player is required to install onto the computer.

    • Limited level of detail can be represented.

Graphic File Formats (4)

  • List examples of Graphic File Formats

GIF Format

  • Graphics Interchange Format

  • Developed by CompuServe in 1987.

  • Most commonly used graphic format on the Web.

  • Restricted to displaying 256 colors.

  • Compressed to 20 to 25% of their original size with no loss in image quality.

  • Most suitable for graphics requiring fewer colors, such as clip art graphics, line art, logos, cartoons, and icons.

  • Less successful with photographic graphics.

  • Supports transparency.

  • Supports interlacing, meaning they can “fade in” gradually as the graphic is loaded. To allow image load gradually

JPEG / JPG Format 24

  • Developed by the Joint Photographic Experts Group.

  • Became an ISO standard and an international standard in 1992.

  • A 24-bit color graphic that can display the full 16.7 million colors.

  • Relatively small file size, smaller than GIF (generally).

  • Can compress typical graphics from 1/10 to 1/50 of their uncompressed bit size without visibly affecting graphic quality.

  • Cannot use transparent colors.

  • JPEG files are not interlaced, meaning they do not “fade in” gradually.

PNG Format 48

  • Pronounced ‘ping’.

  • Published in 1996.

  • Has a status of W3C (World Wide Web Consortium) Recommendation.

  • Devised to supersede GIFs.

  • Reason for superseding: The patent owner of GIF, Unisys, charges a license fee for any program that implements GIF compression and decompression.

  • Can support up to 48-bit color.

  • Offers a more sophisticated form of transparency than GIF.

  • Popularity is slow.

  • Supported by all major Web browsers and graphics programs.

SWF Format

  • Originally developed for vector animations using Macromedia’s Flash.

  • Now an open standard, widely used for vector graphics.

  • SWF does not have the sanction of the W3C but is still widely supported by the market.

  • A highly compact format.

  • Can be rendered very quickly.

  • Mostly used for animations.

  • Use for still graphics is increasing.