How is it that two different images, but same resolution, can have different storage size?

756 views

How is it that two different images, but same resolution, can have different storage size?

In: Technology

5 Answers

Anonymous 0 Comments

Because images are compressed, if you convert them to uncompressed format such as ppm they will occupy almost the same (I’ll get to that difference later).

For example if an image has 20 blue pixels it’s better to store 20*(blue) than blue 20 times, so most image formats do something similar to this (and other more complex methods) to store the images. Videos do this too, which is why sometimes when you’re watching a video suddenly there will be a lot of green or other funny color that gets corrected as people walk around the scene, this is because each frame only stores the changes from the last frame.

Why don’t PPM have the exact same size? That’s simply because a 0 occupies less space (1 character) than a 255 (3 characters) in text mode, in binary mode they should be the same at 1 byte each.

You are viewing 1 out of 5 answers, click here to view all answers.