MadSci Network: Computer Science |
JPEG images typically store 24 bits per pixel, 8 bits each for the red, green, and blue values. This gives 16 million possible colors, which is plenty for most purposes. In fact, very few image formats allow for more than 24 bits per pixel. The main reason for this is that with 24 bits per pixel, we're reaching the limits of the human eye. More bits per pixel would not produce a visible change in the image.
Why doesn't a JPEG on the screen look as good as the real world? Many JPEGs were converted from other graphic formats, such as GIF, which store less than 24 bits per pixel. Another problem is that the number of colors you actually see on the screen depends on your hardware and the settings you are using. (You won't be able to see 16 million colors if your monitor can only handle 256.)
The amount of disk space used by a JPEG depends on several factors. Larger images typically take up more space than smaller images. Complex images typically take up more space than simple images. Most importantly, a JPEG allows you to vary the amount of compression. If you want the image to be stored as accurately as possible, you can use a low compression setting, which will give you a larger file. If you can live with some distortion of the image, you can use a high compression setting, which will make the file much smaller.
Much more information is available in the JPEG FAQ.
Try the links in the MadSci Library for more information on Computer Science.