Optimize Your Images

Optimize Your Images – digital image processing

Ellis M. Zacharias

When working with images on the computer, questions invariably arise concerning values and terms that define images and files. What resolution should be used when scanning a film or a print? How large will the file be? What resolution should be used when making a print? What is the relationship between resolution, image dimensions and file size?

Image values are important and should be understood if an image is to be optimized. For example, if the resolution is too low, the pixels that make up an image will become visible and the image will have a grainy appearance. If the resolution is too high, the file size will be excessive and will require more memory in which to store it. The optimum resolution and file size will be the smallest value that will give the appearance of a continuous tone image and not reveal the pixels.

When optimizing an image it is helpful to understand the various terms and definitions. For example, a pixel (picture element) is one of many dots that make up an image. The resolution of an image is expressed in dpi (dots per inch) or ppi (pixels per inch). Dpi is the conventional term.

File size is expressed in kilobytes (KB) or megabytes (MB). Some very large files may be expressed in gigabytes (GB). There are 1024 bytes in a kilobyte, 1024 kilobytes in a megabyte and 1024 megabytes in a gigabyte. One byte consists of eight bits. In computer vernacular, a single byte represents 256 different shades in an 8-bit grayscale pixel and 256 shades of each color in a “24-bit” RGB (red, green & blue) color pixel.

A “monochrome” image, as we know it, is really a grayscale image that is made up of pixels. A pixel in a 1-byte (8-bit) grayscale image may have any one of 256 shades of gray, ranging from black to white. A true monochrome image would consist of only black pixels on a white background without shades of gray, hence inappropriate for continuous tone images.

The file size of a typical 1-byte (8 bits per byte) grayscale image is given by the simplified expression:

(1) File Size (in bytes) = L x dpi x W x dpi, where L and W are length and width of the image, respectively, expressed in inches, and “dpi” is the pixel density. For example, the file size of a 2-inch by 3-inch, 8-bit grayscale image having a resolution of 72 dpi is: 2 x 72 x 3 x 72 = 31,104 bytes or 31.104 KB.

Similarly, the file size of an RGB (red, green & blue) color image is given by:

(2) File Size (in bytes) = L x dpi x W x dpi x 3, assuming there are three color pixels (RGB) and that each color is comprised of 1 byte (8 bits). This is also referred to as “24-bit color” because there are 8 bits for each of the three colors. If 30 or 36 bit color were used, the result would be different.

The file size of a 2-inch x 3-inch color image at 72 dpi would be: 2 x 72 x 3 x 72 x 3 = 93,312 bytes or 93.312 KB. Note that the file size of a 24-bit RGB color image is exactly three times the size of a an 8-bit grayscale image having the same size and pixel density. The file size is proportionately larger for 30 bit or 36 bit color which may be used by some scanners.

All of the file sizes given in the tables are for uncompressed files. If some form of compression is used, such as JPEG or PDF, the size of the compressed file will be smaller.

When you consider that the human eye has approximately an 8-bit tonal range for each color (256 shades of that color), the utility of a 30-bit or 36-bit scanner eludes me. In other words, why pay more for a 30-bit scanner if the image that results is beyond the 24-bit resolving power of the human eye? Perhaps someone can offer a rational explanation.

Cumbersome file size calculations may be avoided by using the tables in this article. One table is for 8-bit grayscale images and the other is for 24-bit RGB color images. Note that the smallest resolution shown in the table is 72 dpi. The values shown may be used often because 72 dpi is the resolution of most images on internet web pages and 72 dpi is also the resolution of most computer monitors.

The highest resolution shown in the table is 600 dpi. Any higher resolution probably would result in excessively large files for all but the very smallest images. Perhaps a common exception would be for a 35mm slide for which the dimensions of an uncropped image are typically 24 mm x 36 mm or 0.9449 inch x 1.417 inch. The file size, when scanning 35mm color film at resolutions of 1000, 1500, 2000 and 2700 dpi, are 4.02 MB, 9.03 MB, 16.1 MB and 29.3 MB, respectively. When projecting a 35mm slide, a resolution of approximately 6 MB would be large enough so pixels cannot be seen by an observer. A larger file would occupy more space in memory for storing the file, hence wasted memory.

A “screen frequency” of 150 lines per inch is commonly used by the printing industry for photographic images. The resolution for a printed image is typically 1.5 to 2 times the screen frequency, i.e., 225 to 300 dpi. Of course, a higher resolution may be used but more memory will be needed for storing the file with perhaps a negligible or only a marginal improvement in print quality. Keep in mind that each time the resolution is doubled, there is a four-fold increase in the file size.

If a more general equation is desired, one that will accommodate situations involving 30 or 36 bit color or images that have different resolutions in the length and width directions, the following general expression is offered:

(3) File Size (in bytes) = L x “L dpi” x W x “W dpi” x bits per pixel/ 8-bits per byte, where “L dpi” is the resolution in the “L” direction and “W dpi” is the resolution in the “W” direction.

Be aware that the values in the tables were calculated using the simplified equations (1) and (2) and were all based on 8-bit grayscale and 24-bit color (8 bits for each of the RGB colors). Equation (3) should be used for determining the file sizes of other grayscale and color images such as 10-bit and 12-bit grayscale or 30-bit or 36-bit RGB color images.

File Size for Grayscale (Monochrome) Images

Image Resolution in Dots per Inch (dpi)


SIZE 72 dpi 100 dpi 150 dpi 200 dpi


2 x 3 31.1 KB 60.0 KB 135 KB 240 KB

3 1/2 x 5 90.7 KB 175 KB 394 KB 700 KB

4 x 6 124 KB 240 KB 540 KB 960 KB

5 x 7 181 KB 350 KB 788 KB 1.40 MB

8 x 10 415 KB 800 KB 1.80 MB 3.20 MB

11 x 14 798 KB 1.54 MB 3.47 MB 6.16 MB

16 x 20 1.66 MB 3.20 MB 7.20 MB 12.8 MB

30 x 40 6.22 MB 12.0 MB 27.0 MB 48.0 MB


SIZE 250 dpi 300 dpi 450 dpi 600 dpi


2 x 3 375 KB 540 KB 1.22 MB 2.16 MB

3 1/2 x 5 1.09 MB 1.58 MB 3.54 MB 6.30 MB

4 x 6 1.50 MB 2.16 MB 4.86 MB 8.64 MB

5 x 7 2.19 MB 3.15 MB 7.09 MB 12.6 MB

8 x 10 5.00 MB 7.20 MB 16.2 MB 28.8 MB

11 x 14 9.63 MB 13.9 MB 31.2 MB 55.4 MB

16 x 20 20.0 MB 28.8 MB 64.8 MB 115 MB

30 x 40 75.0 MB 108 MB 243 MB 432 MB

File Size for Color Images

Image Resolution in Dots per Inch (dpi)


SIZE 72 dpi 100 dpi 150 dpi 200 dpi


2 x 3 93.3 KB 180 KB 405 KB 720 KB

3 1/2 x 5 272 KB 525 KB 1.18 MB 2.10 MB

4 x 6 373 KB 720 KB 1.62 MB 2.88 MB

5 x 7 544 KB 1.05 MB 2.36 MB 4.20 MB

8 x 10 1.24 MB 2.40 MB 5.40 MB 9.60 MB

11 x 14 2.40 MB 4.62 MB 10.4 MB 18.5 MB

16 x 20 4.98 MB 9.60 MB 21.6 MB 38.4 MB

30 x 40 18.6 MB 36.0 MB 81.0 MB 144 MB


SIZE 250 dpi 300 dpi 450 dpi 600 dpi


2 x 3 1.13 MB 1.62 MB 3.65 MB 6.48 MB

3 1/2 x 5 3.28 MB 4.73 MB 10.6 MB 18.9 MB

4 x 6 4.50 MB 6.48 MB 14.6 MB 25.9 MB

5 x 7 6.56 MB 9.45 MB 21.3 MB 37.8 MB

8 x 10 15.0 MB 21.6 MB 48.6 MB 86.4 MB

11 x 14 28.9 MB 41.6 MB 93.6 MB 166 MB

16 x 20 60.0 MB 86.4 MB 194 MB 346 MB

30 x 40 225 MB 324 MB 729 MB 1.30 GB

NOTE: KB = Kilobyte; MB = Megabyte; GB = Gigabyte; 1 KB = 1000 Bytes; 1 MB = 1000 KB; 1GB = 1000 MB

COPYRIGHT 1999 Photographic Society of America, Inc.

COPYRIGHT 2004 Gale Group