obartra / ssim

🖼🔬 JavaScript Image Comparison
http://obartra.github.io/ssim
MIT License
298 stars 14 forks source link

bmp tests might be incorrect #319

Closed jkeys089 closed 2 years ago

jkeys089 commented 2 years ago

In the test suite BMP images are being decoded using bmp-js which decodes into ABGR. All other formats are being decoded by node-canvas which decodes into RGBA.

As far as I can tell, there is no conversion from ABGR => RGBA happening for bmp's but tests are still passing. If I force the use of canvas to decode bmp images then the tests start failing.

I believe this means the bmp tests are incorrect, right? Sorry if I'm missing something here.

Thanks!

obartra commented 2 years ago

Interesting, the results were saved as snapshots as they were and it just made sure the results were highly correlated with the original ssim paper values.

So there may very well be an issue there. Is this something you would want to contribute as a fix?

jkeys089 commented 2 years ago

@obartra sure, I’ll send a PR.