Reputation: 4415
An image is broken down in picture elements (pixels) which means that when I check the attributes of an e.g. JPEG image stored on disk I can see e.g. 532 × 1051 pixels
which means the width is 532
the height is 1051
.
It also says in the attributes of the file that the color model is RGB which would mean 1 byte for each channel = 3 bytes to describe the color.
So I would assume that the actual size of the image is:
532x1051x3= 1.67MB
But what I see is that the actual file size reported is 45KB.
So does this mean that the 1.67MB
is the size of the image in memory?
Also I see as part of the meta data: Image DPI: 96 pixels/inch
.
What exactly is this information used for?
Upvotes: 2
Views: 116
Reputation: 1756
But what I see is that the actual file size reported is 45KB
That's because JPEG images are compressed in multiple ways to save up space, sometimes up to a factor of ten so this is not unusual. You can just search for "jpeg compression" and read how it is done in detail if you're interested.
Also I see as part of the meta data: Image DPI: 96 pixels/inch. What exactly is this information used for?
Generally, as long as you are only interested in the image stored digitally you do not use it at all, because the image is not stored in inches. You could change the DPI and the image itself would not change, just the image header.
DPI only makes sense once you display/print the image. Then you could take it as a general recommendation on which resolution you should print this image. If you want to print a huge landscape with only 50 pixels per inch, it will not look good. If you however want to print a small logo with low DPI it might still look fine. So it really depends highly on the context of the image.
Upvotes: 1