# Bitmap file size calculation

#1

Page 301

“So a 16 megapixel 24-bit camera image which might only be a 5 Mb JPG would blow up to 48 Mb loaded into a Bitmap object (!).”

As calculated by myself

16,000,000 * 24 / 8 / 1,000,000 = 48

so it would blow up to “48MB”, not “48Mb”

Is it calculated correctly and has anybody raise this problem?

#2

Yes. 16 million x 3 bytes per pixel = 48 million bytes.

#3

@cstewart Yes, my calculation also does not tally up against yours. A 16 Megapixel camera with 24-bit depth would result in (4920 • 3264 • 24) 385,413,120 ÷ 8 = 48,176,640 bytes. Then, to get the size in megabytes, 48,176,640 ÷ (1024 • 1024) = 45.94 megabytes ~ 46 megabytes.

Ok, since you mention JPG, maybe my above calculation does not pan out as it involves shooting in RAW. So, upon recalculation, (4920 * 3264 * 8) ÷ 8 = 16,058,880 bytes ÷ 1024 = 15,682.5 kilobytes ÷ 1024 = 15.315 megabytes ~ 15 megabytes.

No matter what, I am still unable to resolve the difference between your calculation and mine . So, could you please explain how you arrived at 5 megabytes?