If you are designing a web site, sending digital photographs as email attachments or trying to pack as many images on a floppy disk as possible, the size of each image is important. What you want to do is shrink the file size to as few bytes as possible without hurting the image quality.

Most web sites that publish photographs use the JPEG format for their images. JPEG is a popular format for two reasons:

  1. It has good compression characteristics on photographic data
  2. It lets you adjust the amount of compression
Sites like the BBC and CNN adjust the compression ratio to shrink the file size. Most image-handling programs let you tweak the JPEG compression ratio in one way or another. For example, Paintshop Pro lets you adjust the compression ratio on a scale from 1 to 99, with 1 offering the best image quality and lowest compression ratio and 99 offering the lowest quality and highest compression.

The following images give you some sense of the effect that different compression ratios can have on image quality. In all cases I started with the same 400x336 pixel image. The original JPEG image at 1% compression (maximum quality) takes up 152K bytes of disk space, so it is not even included. Besides, there is no difference between 1% compression and 20% compression in terms of image quality even though the size of the file goes down by a factor of 4!


JPEG format, 400x336 pixels, 20% compression, 37Kbyte image size


JPEG format, 400x336 pixels, 40% compression, 25Kbyte image size


JPEG format, 400x336 pixels, 60% compression, 19Kbyte image size


JPEG format, 400x336 pixels, 80% compression, 12Kbyte image size


JPEG format, 400x336 pixels, 90% compression, 7Kbyte image size


JPEG format, 400x336 pixels, 95% compression, 4Kbyte image size

When I look at this particular image, I can begin to see minor degradation at 60% compression (most visible on the border of the blue shirt). 80% and 90% compression is progressively worse, and 95% is badly pixelated. 40% or 50% compression is probably a good value for this image, with an image size of 20 to 25K bytes.

Another way to lower the size of the file is to reduce the image size. For example, here's the same image in a 200x168 format:


JPEG format, 200x168 pixels, 40% compression, 12Kbyte image size


JPEG format, 200x168 pixels, 60% compression, 9Kbyte image size

This smaller image size reduces the file size by a factor of 2!

If your scanner is creating 100Kbyte files, then your scanner is probably producing images in an uncompressed or slightly compressed JPEG format. Using a program like Paintshop Pro you can open the image and re-save it at a different compression ratio to shrink the file size significantly.

Here is an interesting link: