 |

What is it...? I'll stick to the basics and mainly in point form...
First, I'll start with RGB
- RGB stands for RED, GREEN, BLUE.
- Each of these 3 colors is assigned 256 units.
- Using these three colors, each with 256 units, we can create 16,777,216 possible colors.
- We round this off and call it 16 million colors.
- From this selection of possible colors, we must choose only 256 of them to successfully interpret our image. This will give us our 256 colored image.
- Luckily the computer programs that are available attempt to do this for us automatically.
RGB - How it works...
- 1 byte is used to represent a number from 1-255
- If an image has 5 million pixels, we need 15 million bytes (aprox. 14MB)
- this is 1-byte per color per pixel which is TOO BIG
- 24-bit Color: The basic numbers...
- Color depth is expressed in terms of bits per pixel.
- 1 byte has 8 bits
- an image uses 3 bytes per pixel
- 8x3=24 which is 24-bit color or true color.
- Example: an image with 1000 pixels would use 3000 bytes.
- Example: an image with 2000 pixels would use 6000 bytes.
If we change and use only 8-bit color and 1-byte per pixel, we are limited to 256 colors but the file size is much smaller...
256 colors: Why it works.
- First of all a 256 color pallet is established which uses 24-bit descriptors.
NOTE: because only 256 colors are defined, the pallet only uses 756 bytes.
- Then each pixel is described as a 1-byte "palette index number"
-this adds 1 byte for the first color in the palette, 1 for the second and so on…
- This means... an image with millions of pixels takes up 1/3 as much space using 8-bit instead of 24-bit color PLUS the 768 bytes for the palette
- Example: an image with 1000 pixels would be 1000 bytes + the 756 byte pallet for a total size of 1753 bytes.
- Example: an image with 2000 pixels would be 2000 bytes + the 756 byte pallet for a total size of 2753 bytes.


HINT: When converting an image to a GIF, depending on your program, you should have a number of conversion filters. These will help you to get the closest representation of colors that your image needs. Of these choices, there should be a custom option which allows you to personally go into the image's pallet and delete unwanted colors lowering the number of colors to less than 255. A graphic which uses only three colors doesn't need to hold the information of 255 colors.
|