kornelski / cavif-rs

AVIF image creator in pure Rust
https://lib.rs/cavif
BSD 3-Clause "New" or "Revised" License
570 stars 27 forks source link

Weird pink stripe to the right side of AVIF generated from PNG #70

Closed pdobrescu closed 1 year ago

pdobrescu commented 1 year ago

hello and thanks for this great converter!

I'm having some weird issues with certain PNG files that get a pink line to the right side, but only on some specific (old) mobiles. I tested on 2 Huawei devices, using Chrome (I don't have the exact version at hand right now) and the images look like this:

image

The source PNG is this one:

image

And the resulting AVIF is this one (it looks like I can't upload AVIFs to GH):

Test_AVIF.avif.zip

Do you have any ideas why that pink line shows up? Any help will be much appreciated!

kornelski commented 1 year ago

The image you've attached displays fine for me in Firefox, Safari, and Chrome.

This looks like a problem reported previously, about a bug in Microsoft's AVIF decoder in Windows: #60

pdobrescu commented 1 year ago

hello @kornelski and thanks for the quick reply. While I can understand this issue is similar to the one you mentioned, I have encountered it on 2 different Android devices. Is it possible that these older Android phones are using Microsoft's AVIF decoder? On newer Android devices the issue cannot be replicated indeed.

kornelski commented 1 year ago

I've made a new release with latest rav1e encoder, which may or may not help.

I still suspect that it's the same bug in the decoders, and possibly Windows and old Android used the same library.