WyohKnott / image-formats-comparison

MIT License
18 stars 5 forks source link

Misleading resampling #10

Open afontenot opened 4 years ago

afontenot commented 4 years ago

Hi, this is related to #4 but not the same issue.

The issue is that some formats like BPG (the ones rendered by Javascript?) are getting resampled with Lanczos2 before they're rendered into a PNG for the browser, and other formats are not getting resampled at all (or at least are resampled very badly) - including the original image! This leads to some absurd results where parts of an image look better on BPG small than they do in the original, and makes other comparisons difficult.

A good example of this is Seikima-II, which shows a large number of red and blue subsampling artifacts in the original. The visual quality of the arm in the picture is actually better in BPG small due to getting resampled: https://wyohknott.github.io/image-formats-comparison/#seikima-ii&bpg=s&png=l

The solution to this is pretty simple; either don't resample any of the images before displaying them, or resample all of them the same way.

Tested in Firefox 71.0 and Chromium 78.