
Instead, each pixel is represented by a single number (for 8 bit images, a value from 0-255) which is an index into a color lookup table. Image formats such as GIF also, generally, do not directly specify colors in the manner shown above. Additionally, some image formats allow for a much smaller range of colors (example: GIF is an 8 bit format and allows for only 256 different colors to be present in any image). Most image formats, therefore, are compressed to shrink the size of the image. This, however, is a very simple way of representing an image and takes a very large amount of disk space. It is also shown as an enlarged image (in the GIF format since the PPM format shown can not be displayed by most web browsers) where each pixel is replicated as a 50×50 solid colored square.
#THE NAME YOU USED TO CREATE A SIMPLEIMAGE WAS NOT CORRECT FULL#
The following is a super-simple image definition (3×3 image in ascii PPM format- from upper left, black, medium red, full red, medium grey, medium green, full green, white, medium blue, full blue). In the right proportions, red, green, and blue can be combined to form black, white, 254 shades of grey, and a vast array of colors (16,777,216 colors total). The simplest representation of an image has each pixel specified by three 8 bit (24 bits total) color values (ranging from 0-255) defining the amount of red, green, and blue respectively in each pixel. Each pixel (picture element) has one or more numbers associated with it, specifying a color which the pixel should be displayed in. A raster image file is a rectangular array of regularly sampled values, known as pixels.
