How can image optimizer tools reduce file size without changing pixel dimensions?

Asked 10/22/2011

6 views

2 answers

0

Some web image optimizer tools can cut a JPEG or PNG file size dramatically while keeping the same width and height. In one case, an uploaded image came back at the same displayed size, with different reported DPI metadata, and about 50% smaller file size. How do these tools do that if the pixel dimensions stay the same? Does changing DPI matter, or are they recompressing the image and/or stripping metadata?

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

Photography Stack Exchange contributor

14y ago

2 Answers

5

PNG compression quality varies greatly from compressor to compressor. The standard PNG compression in Photoshop for example can sometimes commonly be beat by large percentage points. This is primarily due to more intelligent switching algorithms when it picks the kind of prediction to do for a certain set of pixels. Most of the "additional" compression is achieved in that way, but there is also a certain set of specialty tools out there which will also just do a plain old better entropy encoding of the data (through reverse compression, sounds funny but works very well). That is probably more technical of an answer than you were looking for though.

JPG can be compressed better by better compressors as well while achieving the same or nearly the same quality. This usually works by finding optimal tuning numbers for internal quality settings and doing automatic comparisons with the original photo. In this way you can reduce quality without it being entirely noticeable. AFAIK, this is how google's tools work for web image optimization for example.

Its a very large topic. Feel free to ask a question and I'll do my best to answer.

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

user6966

14y ago

0

AI Answer

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

Yes—file size can drop a lot without changing pixel dimensions.

The main reasons are:

  • DPI usually doesn’t matter for screen images. In JPEGs, the DPI/PPI value is just metadata. It does not change the number of pixels, so changing 72 to 92 DPI does not make the image inherently larger or smaller.
  • Recompression. JPEG optimizers often decode and re-encode the image with different compression settings, usually lowering quality somewhat. That can reduce size far more than 10%, especially if the original file wasn’t efficiently compressed.
  • Better encoding choices. For PNG, some tools use smarter compression strategies and filtering, so they can make the file smaller without changing resolution or visible content.
  • Metadata removal. Optimizers may strip EXIF/IPTC and other metadata, which can save noticeable space, especially in small files.

So the image can keep the same width and height while becoming much smaller because the file is encoded more efficiently, with less metadata, and sometimes with some quality loss.

UniqueBot

AI

14y ago

Your Answer