Media Storage 7

Black & White Images
Media Data Formats
1
Digitizing Images
Media Data Formats
2
Image is divided into rectangles
(usually squares)
Media Data Formats
3
The average darkness of each
rectangle is calculated and
assigned a value
(Typically 256 quantization levels)
Media Data Formats
1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000
4
The digital image is made up of
the small rectangles called pixels
Media Data Formats
5
Each pixel’s color is the same as the
average color of the part of the image it
represents
Media Data Formats
6
The more pixels
used to store the
image, the better
the quality
Media Data Formats
7
400 x 300 Pixels
Media Data Formats
8
300 x 225 Pixels
Media Data Formats
9
200 X 150 Pixels
Media Data Formats
10
100 X 75 Pixels
Media Data Formats
11
40 X 30 Pixels
Media Data Formats
12
40 X 30 Pixels
Media Data Formats
13
Bits per pixel
• The number of quantization levels can
affect the quality too
• Typically a number of bits is assigned to
each pixel
• 3 bits = 8 shades of gray
• 5 bits = 32 shades of gray
Media Data Formats
14
Digitizing Images
Media Data Formats
15
8 bits per pixel - 256 shades
Media Data Formats
16
7 bits per pixel - 128 shades
Media Data Formats
17
6 bits per pixel - 64 shades
Media Data Formats
18
5 bits per pixel - 32 shades
Media Data Formats
19
4 bits per pixel - 16 shades
Media Data Formats
20
3 bits per pixel - 8 shades
Media Data Formats
21
2 bits per pixel - 4 shades
Media Data Formats
22
1 bit per pixel - 2 shades
Media Data Formats
23
Calculating Image Size
• If a grayscale (black &
white) image is 400 x 300
pixels and has 256 shades
of gray, what size would
it be?
Media Data Formats
24
Calculating Image Size
• 256 colors = 8 bits per
pixel
• 400 x 300 = 120000
pixels
• 120000 x 8 = 960000
bits
• 960000 bits = 120000
bytes
• If a grayscale
(black & white)
image is 400 x 300
pixels and has 256
shades of gray,
what size would it
be?
Media Data Formats
25
Calculating Image Size
• If a grayscale image
is 256 x 256 pixels
and has 100 shades
of gray, what size
would it be?
Media Data Formats
26
Calculating Image Size
• 100 colors = 7 bits per
pixel
• 256 x 256 = 65536
pixels
• 65536 x 7 = 458752
bits
• 458752 bits = 57344
bytes = 56 K
• If a grayscale image
is 256 x 256 pixels
and has 100 shades
of gray, what size
would it be?
Media Data Formats
27