How to calculate the size of an image in KB?
morina88
Posted messages
21
Status
Member
-
Armojax Posted messages 1863 Registration date Status Member Last intervention -
Armojax Posted messages 1863 Registration date Status Member Last intervention -
Hello everyone,
I've been searching for hours on how to calculate the size of an image in KB.
My data is as follows:
-Resolution: 75 PPI
-Size in cm: 4*3
-Grayscale: 4 bits (or 2^2)
-Number of bits/pixel: 2
-Size in KB?
If someone could kindly help me out? I know it's easy, but I'm afraid to make a mistake.
Thank you in advance!
I've been searching for hours on how to calculate the size of an image in KB.
My data is as follows:
-Resolution: 75 PPI
-Size in cm: 4*3
-Grayscale: 4 bits (or 2^2)
-Number of bits/pixel: 2
-Size in KB?
If someone could kindly help me out? I know it's easy, but I'm afraid to make a mistake.
Thank you in advance!
Configuration: Windows 7 / Firefox 3.5.8
5 answers
-
Good evening Morina,
- 4 cm is: 4 / 2.54 = 1.575 inches (1 inch = 2.54 cm).
At 75 DPI, that gives: 1.575 x 75 = approx. 118 pixels for the image width
- with the same calculation, we find approx. 89 pixels for the image height.
- number of pixels: 118 x 89 = approx. 10500 pixels
- with 2 bits per pixel (according to your data), you fit 4 pixels into one byte. So the image takes up 10500 / 4 = 2625 bytes.
- 1 kilo = 1000. So the image weighs 2.625 kB (kilobytes)
- now, if we're talking about binary kilo which is 1024 bytes, it's better to say kibi-byte, and the image weighs about 2.56 kibi.
Taking into account your data (4 levels of gray).