# Calculating the size of a bit-mapped graphic

To calculate the size of a bit-mapped graphic the following formula would be used:

Height x Width x DPI x DPI x Bit Depth

### Example

A 500dpi image that measures 7 inches by 6 inches with the availability of 65,536 colours would result in the following calculation:

1. 7 x 6 x 500 x 500 x 16 = 168,000,000 bits
2. 168000000/8 = 21,000,000 bytes
3. 21000000/1024 = 20507.8125 Kilobytes
4. 20507.8125/1024 = 20.03 Megabytes

The DPI figure is used twice because it refers to the width and height of a single square inch.

The bit depth relates to the number of colours available.

The 65,536 colours required need a bit depth of 16 bits.

If the scenario stated 256 colours the bit depth would be 8, had it stated 16,777,216 then the bit depth would have been 24.

• Bit-mapped graphics are stored as a 2D array of pixels
• JPEG, GIF and PNG are common file formats for bit-mapped graphics
• Control over pixel-level editing
• Allow for photo-realism
• Resolution is the term to describe the total number of pixels
• Are resolution dependent (resolution is set at point of creation)
• Bit depth dictates the number of colours that can be used in the image
• Compression is possible using RLE or LZW as well as other techniques
• Bit-mapped images tend to have a larger file size than most vector graphics