02-Digital Image (Raster and Vector Image)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Digital Image

(2D Computer Graphics)

-Multimedia Design Technologies-


2nd Lecture

1
Contents
1. What is a digital Image?
2. Type of digital images
3. Bitmap image
4. Bitmap and Resolution
5. Bitmap and Image size
6. Resolution for Publishing Photos
7. Type of bitmap images
8. Image representations
9. Color Depth
10. Data volumes
2
What is a Digital Image?

A digital image is a representation of a two-


dimensional image as a finite set of digital
values, called picture elements or pixels

3
What is a Digital Image? (cont…)

Pixel values typically represent gray levels,


colors, opacities (transparent levels), etc
Remember digitization implies that a digital
image is an approximation of a real scene
1 pixel

4
Type of digital images

z Raster/Bitmap Image
• pixels in a grid
• resolution dependent
• resizing reduces quality
• easily converted
• restricted to rectangle
• minimal support for transparency
Original Object A Bitmap Image

z Vector Image
{ Vector images describe the image in the term of coordinates and
mathematical transformations.

5
Bitmap/Raster Image
z Common bitmap-based formats are JPEG/JPG, GIF, TIFF, PNG,
PICT (Macintosh), PSD (Adobe Photoshop) ,and BMP.
z Popular bitmap image editing programs are
{ Microsoft Paint 1 pixel

{ Microsoft Photo Editor


{ Adobe Photoshop
{ Corel Photo-Paint
{ Corel Paint Shop Pro , etc
z Bitmap-based images are comprised of pixels in a grid. Each pixel
or bit in the image contains information about the color to be
displayed.
z Bitmap images have a fixed resolution and cannot be resized
without losing image quality.
z Most bitmap images can be converted to other bitmap-based
formats very easily.
z Bitmap images tend to have much large file sizes than vector
graphics and they are often compressed to reduce their size. 6
Bitmap Image and Resolution

z Bitmap images are resolution dependent.

z Resolution is a measurement of the output quality of an image, usually in


terms of samples, pixels, dots, or lines per inch.

z The terminology varies according to the intended output device. PPI (pixels
per inch) refers to screen resolution, DPI (dots per inch) refers to print
resolution, and SPI (samples per inch) refers to scanning resolution.

z Resolution pixels
PPI =
inches
Exercise: Calculate resolution (PPI) of your monitor!
(in the case of IPS room’s monitors and its default setting,
7
size 12x9 inches (monitor type is 15 inches), 1024x768 pixels)
Bitmap Image and Resolution (cont…)
z Bitmap images are referred to as high resolution (hi-res) or low
resolution (low-res).

z High resolution would be an image intended for print, generally


having 300 ppi or more.

z Low resolution refers to images only intended for screen display,


generally having 100 ppi or less.

z Bitmap images are displayed on your computer screen at screen


resolution: approximately 100 ppi.

z When printing bitmaps, your printer needs much more image data
than a monitor. In order to render a bitmap image accurately, the
typical desktop printer needs 150-300 ppi.

8
Bitmap Image and Image Size
z When you reduce the size of a bitmap image through your software's
resize command, you must throw away pixels.
z When you increase the size of a bitmap image through your software's
resize command, the software has to create new pixels.
z When creating pixels, the software must estimate the color values of
the new pixels based on the surrounding pixels. This process is called
interpolation.

increase
reduce the size
the size

100x75 pixels
Original image 9

200x150 pixels 800x600 pixels


How to Calculate Resolution for Publishing Photos
z A real problem: I want to print a photo. And, I need it to be a high
resolution photo (300 PPI or more) in 5x8 inches. The photo I have is a
702KB, 1538 x 2048 jpeg. Can I print the photos in the high resolution?

z The photo is 1538 x 2048 and I need a print size of 5x8 inches… The math
you need is:
{ pixels/inch=PPI
{ 1538/5=307 PPI
{ 2048/8=256 PPI
z That means that 256 is the maximum PPI you can get from this image to
print the longest side at 8 inches without letting your software add new
pixels.

z Please, Calculate minimum pixel sizes that I need to print 5x8 inches a high
resolution photo!
z The math you need is: inchxPPI=pixels
z 5x300 = 1500
z 8x300 = 2400 ∴The minimum pixels that I need is 1500x2400

Exercise: How many number of pixels do you need to print a high


10
resolution photo on a postcard(148x200 mm)
Type of Bitmap Image

Common image formats include:


{1 sample per point (B&W or Grayscale)
{3 samples per point (Red, Green, and Blue)
{4 samples per point (Red, Green, Blue, and “Alpha”)

11
Black &White Grayscale color (RGB) Color (RGBA)
Black and White Image (Zoom In)

12
Grayscale Image(Zoom In)

13
Color Image(Zoom In)

14
Bitmap Image & Color Depth
A Pixel Æ Smallest unit of the digital image elements
A Color Depth is number of a color intensity
levels that can be displayed on the screen
A
pixel's data
B&W Image :White or Black
(0 or 1)

Grayscale :Black~White
(0~[ N ])
Color Image;
(Red :0~[ N])
(Green:0~[ N])
(Blue :0~[ N])
a pixel's intensity level data
15
(Color Depth)
Color Depth
(Grayscale Image)
a pixel in a grayscale image has a color information
indicate a level of grayscale color from white to black

Grayscale :White--Black
(0 ~ [ N ])

0 1 2 3 4 5 6 ….N

a pixel's color intensity level


data (Color Depth) 16
Color Depth
(RGB Color Image)
a pixel in a RGB color image has three differences color information;
Color intensity level of Red, Green and Blue.
Red : white ….Red

1 pixel

Green : white ….Green

Blue : white ….Blue

17
Color Depth (RGB Color Image)
Color Information

is represented by
the levels of Red,
Green and Blue.


18
Bitmap Image Representation (cont…)

Digital images are represented by function f(i,j)


i I The value of a pixel is
represented by a set values of
function f(I,J)
j
J f(i,j)=0,1 B&W Image

f(i,j)=0,1, … , 255 Grayscale

f(i,j)=(r,g,b) Color Image

r,g,b=0,1,…,255
19
Smallest Unit of memory
Recordable data
OFF=0
Or
ON= 1

a bit

8 bits = a byte
Recordable data in the 8bits= a byte of memory
00000000 00001000 11111000
00000001 00001001 11111001
00000010 00001010 11111010
00000011 00001011 ……… 11111011 = 256 difference data
00000100 00001100 11111100
00000101 00001101 11111101
00000110 00001110 11111110 20
00000111 00001111 11111111
Image Representation (Cont…)
A pixel’s color information
on a memory buffer (8bits)
f(i,j)=0,1 B&W Image 0, 1

Grayscale 00000000
f(i,j)=0,1, … , 255 00000001
00000010

11111110
11111111
f(i,j)=(r,g,b) Color Image
00000000 00000000 00000000
00000001 00000001 00000001
r,g,b=0,1,…,255 00000010 00000010 00000010

11111110 11111110 11111110


11111111 11111111 11111111

21
Number of bits and Color Depth
z Color depth is defined by the total number of bits per pixel that can be
displayed on the computer screen.
Color Depth = 2 ^ Number of bits
z Data is stored in bits. Each bit represents two colors because it has a
value of 0 or 1.
z The more bits per pixel, the more color that can be displayed.

z For example:
z Each pixel in a 4-bit image can display one of the possible 16 colors,
z Each pixel in a 8-bit image can display one of the possible 256 colors,
z Each pixel in a 16-bit image can display one of the possible 65,535
colors,
z Each Pixel in a 24-bit image can display one of 16,777,216 color
(over 16-million colors).

22
Data volumes
A Data volume is mainly effected by number of pixels, type of image,
color dept and others file information.
z Examples:
z Black & White Image
z size: 512x512 pixels/image
z Results in 512x512=262,144bit/Image≒262kbit/image
z = 32,768 byte≒32.8kByte

z Grayscale Image
z size: 512x512 pixels/image
z Color Depth: 256 colors= 8bits/pixel
z Results in 512x512x8=2,097,152bit/Image≒2.1Mbit/image
z =262,144Byte≒262.1kByte

z RGB Color Image


z size: 512x512 pixels/image
z Color Depth: 256 colors = 8bits/color/pixel
z Results in 512x512x8x3=6,291,456bit/Image≒6,3Mbit/image
z =786,432 Byte≒786.4kByte

23
Exercise:
Please, calculate data volumes of the following Bitmap Images!

1) Black & White Image


size: 400x300 pixels/image

2) Grayscale Image
size: 400x300 pixels/image
Color Depth: 16bits/pixel =65536 colors

3) RGB Color Image


size: 400x300pixels/image
Color Depth: 24bits/color/pixel
=16777216
(difference level/color)

4) How many number of pixels do you need to print a high


resolution photo/poster on A3 paper size (297x420 mm) 24
Note: 1 inch=2.54 cm

You might also like