Chapter Three
Graphic/Image Data Representation
KUMKUMO K. @DDUIoT
Graphic/Image
2
An image could be described as two-dimensional array of points
where every point is allocated its own color.
Image is a collection of these points that are colored in such a
way that they produce meaningful information/data.
Every such single point is called pixel, short form of picture
element in digital images.
Pixel contains the color or hue and relative brightness of that
point in the image.
The number of pixels in the image determines the resolution of
the image. KUMKUMO K. @DDUIoT
Image Resolution
3
refers to the spacing of pixels in an image and is measured in
pixels per inch, ppi, sometimes called dots per inch, dpi.
number of pixels in a digital image (Higher resolution always
yields better quality.)
width x height (e.g., 640X480)
Most common Aspect ratio: 3:4 (lines:columns)
Dots (pixels) per inch, dpi or ppi (e.g., 72 ppi/dpi)s
KUMKUMO K. @DDUIoT
Types of images
4
Computer Software/applications work with two basic forms of images:
1) Vector graphics
created using points, lines, rectangles, ellipses, arcs, or Curves- called
primitives.
Draw programs, also called vector graphics programs, are used to create
and edit these vector graphics.
These programs store the primitives as a set of numerical coordinates and
mathematical formulas that specify their shape and position in the image.
This format is widely used by computer-aided design programs to create
detailed engineering and design drawings.
It is also used in multimedia when 3D animation is desired.
KUMKUMO K. @DDUIoT
Types of images
5
Draw programs have a number of advantages over paint-type programs.
Precise control over lines and colors.
Ability to skew and rotate objects to see them from different angles or add perspective.
Ability to scale objects to any size to fit the available space. Vector graphics always
print at the best resolution of the printer you use, no matter what size you make them.
Color blends and shadings can be easily changed.
Text can be wrapped around objects.
KUMKUMO K. @DDUIoT
Types of images
6
2) Bit-map images (also called Raster Graphics)
Bitmap formats are the one used for digital photographs.
They are formed from pixels-a matrix of dots with different
colors.
Bitmap images are defined by their dimension in pixels as
well as by the number of colors they represent.
E.g. 640X480 image contains 640 pixels in horizontal and 480 pixels vertical
® All digital photographs and paintings are bitmapped, and
any other kind of image can be saved or exported into a
bitmap format.
KUMKUMO K. @DDUIoT
7
1-bit (Monochrome/Bit-Map) Images
Also called Binary image
consists of on and off bits stored as a single bit (0
or 1)
The value of the bit indicates whether it is light or
dark since it contains no color.
A 640 x 480 monochrome image requires 37.5 KB
of storage.
Such images are satisfactory for displaying simple
graphics
KUMKUMO K. @DDUIoT
8 Gray-scale Images
Each pixel is usually stored as a byte
(value between 0 to 255)
This value indicates the degree of
brightness of that point. This brightness
goes from black to white
A 640 x 480 grayscale image requires
over 300 KB of storage.
KUMKUMO K. @DDUIoT
9 8-bit Color Images
One byte for each pixel
Supports 256 out of the millions
possible, acceptable color quality
A 640 x 480 8-bit color image requires
307.2 KB of storage (the same as 8-bit
grey scale)
•Examples: GIF
KUMKUMO K. @DDUIoT
10 24-bit Color Images
Each pixel is represented by three bytes (e.g., RGB)
Supports 256 x 256 x 256 possible combined colors
(16,777,216)
A 640 x 480 24-bit color image would require 921.6 KB of
storage
Most 24-bit images are 32-bit images,
o the extra byte of data for each pixel is used to store an alpha
value representing special effect information.
KUMKUMO K. @DDUIoT
11
Popular File Formats
Choosing the right file type for your image to save is vital importance. If you
are, creating image for web pages, then it should load fast. So, such images
should be small size.
The other criteria is quality of the image that is possible using the chosen file
type.
You should also be concerned about the portability of the image.
To choose file type:
resulting size of the imagelarge file size or small
quality of image possible by the file type
portability of file across different platforms
KUMKUMO K. @DDUIoT
12 Popular File Formats
The most common image file formats used on internet. sometimes called
System Independent Formats are
Graphics Interchange Format (GIF)
One of the most important formats because of its historical connection to the WWW and
HTML markup language as the first image type recognized by net browsers.
Initially for transmitting Graphical images over phone lines via modems.
Portable Network Graphics( PNG)
It is intended as a replacement for GIF in the WWW and image editing tools.
PNG-24 is another version of PNG, with 24-bit color support, allowing ranges of
color to a high color JPG.
Supports interlinking
KUMKUMO K. @DDUIoT
13 Popular File Formats
Joint Photographic Experts Group(JPEG )
created by the Joint Photographic Experts Group
The most important current standard for image compression (.jpg, .jpeg, .jpe).
The human vision system has some specific limitations andJPEG takes advantage of
these to achieve high rates ofcompression.
JPEG allows the user to set a desired level of quality, or compression ratio (input
divided by output).
Though JPGs can be interlaced, they do not support animation and
transparency unlike GIF.
KUMKUMO K. @DDUIoT
14 Popular File Formats
Tagged Image File Format (TIFF)
stores many different types of images (e.g., monochrome,
grayscale, 8-bit ,24-bit & RGB, etc.)
Uses tags, keywords defining the characteristics of the image that is
included in the file. For example, a picture 320 by 240 pixels would
include a 'width' tag followed by the number '320' and a 'depth' tag
followed by the number '240'.
It does not provide any major advantages over JPEG and is not as
user-controllable.
Do not uses TIFF for web images. They produce big files, and more
importantly, most web browsers will not display TIFFs.
KUMKUMO K. @DDUIoT
Popular File Formats
15
System dependent Formats
Windows(BMP): X-windows(XBM):
A system standard graphics file format Primary graphics format for the
for Microsoft Windows X Window system
It is capable of storing 24-bit bitmap Supports 24-bit color bitmap
images
Used in X Windows for storing
Used in PC Paintbrush and other
programs icons, pixmaps, backdrops,
etc.
Macintosh(PAINT, 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
KUMKUMO K. @DDUIoT