WyohKnott / image-formats-comparison

MIT License
18 stars 5 forks source link

Due to changes in Firefox, images are now doubly color corrected #12

Open afontenot opened 3 years ago

afontenot commented 3 years ago

I'm not sure what release fixed this, but Firefox is now color correcting all images written to a canvas. Previously there was a problem with this tool where images decoded in Javascript and then written to canvas would not be color corrected, see https://github.com/WyohKnott/image-formats-comparison/issues/11 but now the issue is the opposite. Because of the way the comparison script works internally, the image data is actually copied between two canvasses, which means that Firefox imposes color management twice!

See the following comparison: the image in this comparison tool on the left is strongly desaturated (on my color managed WCG monitor) compared to the same image shown in a color managed viewer (eye of Gnome). compare

There is no issue (as far as I know) on Chrome, because Chrome appears to be treating canvases as always sRGB, only doing color correction at the final rendering stage. Chrome is therefore not capable of rendering WCG images on a canvas, while Firefox is.

Note that I fixed this issue on my fork some time ago when I rewrote the script to only use one canvas, along with a lot of other bugs.