Data representationCalculating the size of a bit-mapped graphic

Data goes through the central processing unit which utilises main and cache memory to improve system performance. Peripherals use interfaces to communicate between the system and a connected device.

Part ofComputing ScienceComputer systems

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.