Image format

       Images can be in many formats. Let's start with the easy way to make a picture. 200 pixels horizontally and vertically means 40,000 points in all. And if it's good, there's one byte for each of the colors red, green and blue, to make "every" color (16,777,216 in all). 3 bytes are 24 bits. So we need 40,000 x 24 bits. Bitmaps (.bmp) are made like this, and result in big files.
       gif is another format. There's only one byte for the colors, therefore only 256 colors to choose from. So now there's 40,000 x 8 bits. We also need some room to keep track of which 256 colors are actually used - depending on e.g. whether the picture is very green or very red. The picture can also save some room by saying "this pixel is green, and so are the next 77".
       jpg is yet another format. Where gif is good at drawings with lines, because this results in long lines of pixels, jpg is compressed in another way, good for photos.
       Other possible formats include tif and png.

Concept last updated: 06/05 2004.


can limit the need for
is about e.g.

Other sources

If Image format img-tag