Home > Information Processes and Technology > Multimedia Systems > Calculating Image File Sizes
Calculating Image File size is an important issue for multimedia designers. If a file size is too large it may make for a painfully slow download speed but if an image has been over optimized it may make a site look very unprofessional. Image storage has traditionally been memory and resource hungry. With processing power increases, disk storage space increasing exponentially and improvements with internet bandwidth file size is not as critically important as it once was but even so multimedia designers still make a huge effort to keep the file size of images and movies as small as possible. The elements covered in this summary are:
This material addresses aspects of the following syllabus outcomes:
H1.1 applies and explains an understanding of the nature and function of information
technologies to a specific practical situation
H1.2 explains and justifies the way in which information systems relate
to information processes in a specific context
H2.1 analyses and describes a system in terms of the information
processes involved.
H2.2 develops and explains solutions for an identified need which addresses all of
the information processes
H3.1 evaluates and discusses the effect of information systems on the individual,
society and the environment
H3.2 demonstrates and explains ethical practice in the use of information systems,
technologies and processes
H4.1 proposes and justifies ways in which information systems will meet emerging
needs
H5.2 assesses the ethical implications of selecting and using specific
resources and tools, recommends and justifies the choices
Source: Board of studies NSW, Stage 6 Information Processes and Technology, Preliminary and HSC Courses (2007)
A black and white image has two dimensions that need to be considered the number of pixels in the horizontal plane multiplied number of pixels along the vertical axis. Note that a black and white image is not grey scale.
Example
The formula is:
File size = horizontal pixels × vertical pixels × bit depth
-------------------------------------------
8(to convert to bytes)
× 1024 (kilobytes)
this image has the properties of 208 pixels wide by 182 pixels high. The file size in bits can then be worked out by multiplying horizontal pixels by vertical pixels.
file size = 208 × 182 x 1
-------------
8 × 1024
= 37856
------
8192
= 4.62 KB
Note the file size of the image on this page will not appear wrong because it is a compressed format. This formula works with non compressed.
There are two things you need to be concerned about with a black and white image width and height. It is the old area of a rectangle problem from primary school. The units being used are pixels.

The Area of a Rectangle formula is the key.
multiplying width and breadth: 208 × 182
= 37865 in bits
The bit depth is irrelevant because it is black and white. One means on and is shown as black. Zero means off and shows as white. Note the file size on the hard drive will differ to the image size because of the size of the allocation blocks on the hard drive
Elements that Interfere with File Size
There are a variety of things that will interfere with the file size of an image. These things include:
Bit depth plays a roll once colour is included and it is important to keep in mind that colour includes shades of grey. Because the bit depth is no longer a 1 or a zero it plays an important part in the formula.
| Bit Depth (Bits Per Pixel) |
Number of Colours or Tones |
Where do # of Colours Come From? |
|---|---|---|
| 1 | 2 | 21=2 |
| 2 | 4 | 22=4 |
| 3 | 8 | 23=8 |
| 4 | 16 | 24=16 |
| 6 | 64 | 26=64 |
| 8 | 256 | 28=256 |
| 16 | 65 536 | 216=65 536 |
| 24 | 16 777 216 | 224= 16 777 216 |
| 32 | 4 294 967 296 | 232= 4 294 967 296 |
Where as the black and white image equates to a 2D formula bit depth now adds a 3rd dimension of depth. Of course the third dimension of depth is indeed the bit depth.
This
grey scale image has 3 dimensions. Lets
examine the properties of this image.
Remember that because this image is a
gif the actual file size will be
different to the result in the formula.
The image is 200 pixels horizontal by 200 pixels vertical. Now we need to know the bit depth. The bit depth of this image is 8.
File size = 200 × 200 × 8
-----------------
8 × 1024
= 320000
----------
8192
=39 KB
The file size of an animation is simply a process of multiplying the number of frames by the image size of each image.
image courtesy of Bettscomputers.com