Download presentation
Presentation is loading. Please wait.
1
How to Convert Pictures into Numbers
Digitizing Pictures How to Convert Pictures into Numbers
2
Digitizing Pictures We already know how to represent numbers in binary. Divide the picture into very small squares (pixels) and determine the color of each pixel. Pixel: a “picture element”—a dot Assign a number to each color and use the binary representation of that number and you are done!
3
Digitizing Pictures: Options
Two things affect picture quality: Resolution: number/size of pixels More pixels = more numbers = more memory. Number of colors: More colors = more numbers = more memory.
4
Elvis Line Art 100% This is a picture of Elvis made up of only 2 colors: black and white.
5
Same picture at 800%. Each pixel is outlined in black.
Elvis Line Art 800% Same picture at 800%. Each pixel is outlined in black.
6
Same picture at 1600%. Pixel structure is obvious.
Elvis Line Art 1600% Same picture at 1600%. Pixel structure is obvious.
7
Elvis as zeros and ones:
Same picture at 1600%. Pixel structure is obvious. You can actually see the eye!.
8
Elvis Gray Scale (256 shades)
Same picture in “gray scale” – 256 shades of gray. Each pixel is represented by an 8-bit number in the range from 0 [black] to 255 [white]. Note the shades of gray.
9
Gray Scale
10
Elvis Gray Scale 800%
11
Elvis Gray Scale 1600%
12
Elvis 8-bit color (GIF) Elvis in 8-bit color. Skin colors are not as smooth as with 24-bit color.
13
Elvis 8-bit color 800% Same picture at 800%.
14
Elvis 8-bit color 1600% Same picture at 1600%.
15
Elvis 24-bit color 100% Same picture in 24-bit color: 8 bits for red, 8 bits for green, and 8 bits for blue. Total possible colors is 256 x 256 x 256, or over 16 million. Also called “True Color”. Gives photo-quality displays. True Color: 24-bits, 16 million colors
16
Elvis 24-bit color 800% Same picture at 800%. Pixels are outlined in black.
17
Elvis 24-bit color 1600% Same picture at 1600%. Pixel structure is obvious.
18
Graphic Memory Requirements
16 million colors: Elvis 24-bit color BMP 127 KB (each pixel is represented by 3 bytes – no compression) Elvis 24-bit color JPG 16 KB (each pixel is represented by 3 bytes, but with “lossy” compression). Lossy compression: the picture viewed is not the same pixels as the original. Pixels have been lost.
19
Lossy Compression Original After 40 saves
20
Graphic Memory Requirements
256 colors: Elvis 8-bit color BMP 44 KB (each pixel is represented by a single byte, no compression) Elvis 8-bit color GIF 37 KB (each pixel is represented by a single byte, with “lossless” compression) Lossless compression: the picture is compressed, but when viewed, all of the original pixels are there.
21
Side-by-side comparison
2 colors shades colors M colors of gray
22
24-bit (top) vs. 8-bit color
23
` 24-bit color 8-bit color Gray scale 1-bit line art
Comparison: ` bit color bit color Gray scale bit line art
24
Conclusion: Pictures look better if you have:
More pixels (higher resolution) This requires more memory. More colors
25
Paint.NET Paint.NET is an open-source image editor
Web site:
26
The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.