image icon indicating copy to clipboard operation
image copied to clipboard

QOI doesn't render black in edgecases

Open adiee5 opened this issue 6 months ago • 2 comments

The exact issue and its causes has been discussed here: https://github.com/phoboslab/qoi/issues/258

Essentially, in some cases, black may not render correctly (it renders as transparent) and image-rs implementation of QOI decoder seems to be vulnerable. All the screenshots are from GNOME Image Viewer (loupe), which seems to rely on this library for handling QOI

Expected

Entire black background renders correctly Image of an expected result

Actual behaviour

Black background doesn't render correctly

Reproduction steps

Open a QOI image which triggers a bug (it can be found in qoi_test_images.zip archive created by format's author.)

adiee5 avatar Jun 14 '25 11:06 adiee5

I just found this problem myself, and to my surprise someone else noted it on the very same day. Looking at the code it seems like the implementation fault is in the qoi dependancy whose repository is github.com/aldanor/qoi-rust. I'll be creating an issue there shortly.

pearcebasmanm avatar Jun 15 '25 00:06 pearcebasmanm

This is fixed upstream in git: https://github.com/aldanor/qoi-rust/issues/16

But a new version with the fix has not been released to crates.io

Shnatsel avatar Aug 24 '25 13:08 Shnatsel