Monday, May 26, 2008

Memory cost of images


see more:"http://www.scantips.com/basics1d.html"

Large images consume large memory and make our computers struggle. Memory cost for an image is computed from the image size.

For a 6x4 inch image at 150 dpi, the image size is calculated as:

(6 inches × 150 dpi) × (4 inches × 150 dpi) = 900 × 600 pixels

900 × 600 pixels is 900 × 600 = 540,000 pixels.

The memory cost for this RGB color image is:

900 × 600 × 3 = 1.6 million bytes.

The last "× 3" is for 3 bytes of RGB color information per pixel for 24 bit color (3 RGB values per pixel, one 8-bit byte for each RGB value, which totals 24 bit color).

Different color modes have different size values, as shown below:

Image Type
Bytes per pixel
1 bit Line art
1/8 byte per pixel
(1 bit per pixel, 8 bits per byte)
8 bit Grayscale
1 byte per pixel
16 bit Grayscale
2 bytes per pixel
24 bit RGB
3 bytes per pixel
Most common for photos, for example JPG
32 bit CMYK
4 bytes per pixel
For Prepress
48 bit RGB
6 bytes per pixel

No comments: