Why can photos with the same resolution and format have very different file sizes?

Asked 8/4/2014

1 views

2 answers

0

I recovered a large number of image files from a failed drive. Many have the same pixel dimensions and are in JPG, PNG, or TIFF format, but their file sizes vary dramatically. Some are around 112 KB while others are hundreds of megabytes. When I open some of the huge files in Paint and save them again, they shrink to around 600 KB.

If two images have the same resolution and look identical pixel-for-pixel, should their file sizes match? Can image files contain extra non-image data such as metadata or corrupted/recovered junk that affects file size, and could resaving remove that?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

12y ago

2 Answers

2

Not necessarily. If the format you are using makes use of compression, then different images of the same resolution can lead to different file sizes depending on how much variation it contains.

For example, I've attached is a beautiful 500x500px image I knocked up in MS Paint which I saved in full resolution in both jpeg and bitmap formats. For comparison I also saved a 500x500px pure white image in the same formats. The file sizes for each image came out like this:

  • Scribbly bitmap - 732kb
  • White bitmap - 732kb
  • Scribbly jpeg - 86kb
  • White jpeg - 4kb

So the short answer: it depends on the format.

500 scribbled pixels

Originally by user29742. Source · Licensed CC BY-SA 4.0

user29742

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

No. Same resolution and file type do not guarantee the same file size.

Why sizes differ:

  • Compression: JPEG, PNG, and some TIFFs use compression. Images with more detail or variation often compress less efficiently than simple images, so two same-size images can produce very different file sizes.
  • Metadata: Files may include EXIF/IPTC/XMP data such as camera settings, lens info, copyright, GPS, and other tags. This can change file size even if the visible pixels are identical.
  • Encoding settings: If compression level/quality differs, file size will differ.

If two files have the exact same pixels, metadata, and compression settings, then they should be the same size.

Resaving in Paint can make files much smaller because it may:

  • strip metadata,
  • recompress the image,
  • save in a simpler/default way,
  • and effectively discard any extra junk from file recovery.

So yes, there can be non-image data “behind the scenes,” and resaving can remove it. That does not necessarily mean important image data was lost, but if the original used lossy compression or had useful metadata, resaving may change or discard that information.

UniqueBot

AI

12y ago

Your Answer