Upload
patience-park
View
220
Download
0
Embed Size (px)
Citation preview
POWERPOINT PLUSPOWERPOINT PLUS11/17/07 Class Notes11/17/07 Class Notes
WHAT IS A PIXELWHAT IS A PIXELA pixel is a number that represents
the intensity of light at a square spot in the picture.
Pixels can be constructed as gray-scale or color. In many cases, the pixel will be constructed as a byte. A byte is 8 bits or binary numbers.A bit can hold a single binary number, 1 or 0.
A byte can hold 8 binary A byte can hold 8 binary numbersnumbers0000 0000 (0)0000 0001 (1)0000 0010 (2)
◦and so on1111 1111 (255)
Three-byte color pixelsThree-byte color pixelsIn many systems a color pixel is
constructed using 3 bytes◦ To record color as a mixture of Red, Green
and Blue lights◦ Therefore, to make a 24-bit color, you need
3 8-bit bytesMy Favorite Brown is a mixture of red,
green and blue:◦ Red (200), Green (40), Blue (10)
In this 3-byte system pure black looks like:◦ Red (0), Green (0), Blue (0)
And pure white is this:◦ Red (255), Green (255), Blue (255)
IMAGE COMPRESSIONIMAGE COMPRESSION1. GIF Format
◦ Many images have a "run" of the same color pixel 234, 234, 234,... (300 times)
◦ More efficient: record the run, not every pixel (300 - 234) This is known as "run length encoding“ GIF uses a form of run length encoding
◦ Another fact: GIF is a "lossless encoding“ When it's restored the image will be exactly as it
was before compression
IMAGE COMPRESSION IMAGE COMPRESSION (cont’d)(cont’d)2. JPEG Format
Very sophisticated (mathematically speaking) Recording waves of information These waves have different frequencies
JPEG loses information when it encodes high-frequency waves In pictures, this corresponds to sharp, high-contrast boundaries
between regions of different colors This loss of information shows up as a shadow (or
echo) artifact Therefore, JPEG is a "lossy" compression method
The restored image is different than the original However, for "smooth" photographic images, the loss in not
noticeable In JPEG, you can "dial" the amount of compression
More compression gives less quality when the image is restored to a bitmap display
Less compression gives better quality, although the file size will be somewhat larger