MadSci Network: Computer Science

Re: How many colours can be displayed in a JPEG?

Date: Tue Apr 11 12:22:31 2000
Posted By: Ryan Scherle, Grad student, Computer Science & Cognitive Science, Indiana University
Area of science: Computer Science
ID: 955238092.Cs

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.

Current Queue | Current Queue for Computer Science | Computer Science archives

Try the links in the MadSci Library for more information on Computer Science.

MadSci Home | Information | Search | Random Knowledge Generator | MadSci Archives | Mad Library | MAD Labs | MAD FAQs | Ask a ? | Join Us! | Help Support MadSci

MadSci Network,
© 1995-2000. All rights reserved.