If you aredesigning a Web site,sending digital photographs as e-mail attachmentsor trying to pack as many images on afloppy diskas possible, the size of each image is important. What you want to do is shrink the file size to as fewbytesas possible without hurting the image quality.
Most Web sites that publish photographs use theJPEG(pronounced "jay-peg") format for their images. JPEG is a popular format for two reasons:
Advertisement
- It has good compression characteristics on photographic data.
- It lets you adjust the amount of compression.
Sites likeBBCiandCNN.comadjust thecompression ratioto shrink the file size. Most image-handling programs let you tweak the JPEG compression ratio in one way or another. For example, Paint Shop 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-percent compression (maximum quality) takes up 152 kilobytes of disk space, so it is not even included. Besides, there is no difference between 1-percent compression and 20-percent compression in terms of image quality, even though the size of the file goes down by a factor of four!
When I look at this particular image, I can begin to see minor degradation at 60-percent compression (most visible on the border of the blue shirt). Eighty-percent and 90-percent compression is progressively worse, and 95-percent compression is badly pixelated. Forty- or 50-percent compression is probably a good value for this image, with an image size of 20 to 25 kilobytes.
Another way to lower the size of the file is toreduce the image size. For example, here's the same image in a 200x168 format:
This smaller image size reduces the file size by a factor of two!
If yourscanneris creating 100-kilobyte files, then your scanner is probably producing images in an uncompressed or slightly compressed JPEG format. Using a program like Paint Shop Pro, you can open the image and re-save it at a different compression ratio to shrink the file size significantly.
These links will help you learn more:
- JPEG FAQ
- Image Formats on the Web
- The Graphics File Formats Page
- Image File Guide
- How File Compression Works
- How Digital Cameras Work
- How Web Pages Work
- How Scanners Work
- Why are there so many different image formats on the web?
- My scanner has a resolution of 9,600x1,200 dpi -- what do those numbers mean?
Advertisement