Images make up a very big part of the (web page traffic) data on the Internet. This is because an image contains a lot of information compared to text. Even a small image sized 200 by 200 (pixels) saved in the bitmap format (using a 24 bits per pixel storage system) can take up 200x200x24 = 960,000 bits or 960,000/8 = 120,000Bytes = 117.1975Kilobytes (120000/1024 = 117.1875). Below is the image saved in the bitmap, gif, png and jpeg formats. The last three are popular web page formats. As can be seen the most efficient format is jpeg at 8KB file size because it is designed to store information on millions of colours that may blend into each other e.g. a photograph or complexly coloured image. The least efficient is bitmap, and that is why this type of image is not commonly found on web pages (though browsers can display it). Both gif and png are designed to store images that have relatively distinct areas of plain colours.
Jpeg, Gif and Png use their own compression algorithms. A comparison table is below. Also, each format is either lossy or lossless in nature. Lossy means some of the original raw image data is discarded when it is saved in the format. Lossless means no data is discarded. In addition, when saving an image in the Jpeg format a quality setting can be specified, with 100 being the maximum value. Lower settings result in smaller file sizes, but at the expense of image quality. Look at the two images in the second table below.
A simple type of image compression is called run length encoding. It is used by fax machines to compress black and white images into a more manageable file size for transmission. The following link points to a pdf on the CS Unplugged website that shows how it is done using a method called run length encoding. Activities are also included.: image representation
Additional useful information and links can be found at the bottom of this page in the site
Below is a list of programs to convert one type of image format to another and to edit such properties as bit depth and number of colours.
Data Compression >