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

Converted images sometimes get orange/magenta overlays on the right edge #60

Closed JSorngard closed 1 year ago

JSorngard commented 1 year ago

It is clearest in this screenshot: bunny_artifact

I have been unable to determine exactly what causes this, because some images convert just fine (this one was first converted to png with windows paint and then to avif with cavif):

eso_fine

The affected edge seems to be of constant size in pixels, because larger images have a smaller edge:

large_affected

This is on windows with the latest version.

These are the affected images for debugging: BUNNY! 2K3vqjE

This is an unaffected image: BcFu4F9

kornelski commented 1 year ago

I believe that the files are correct, and this is a bug in Windows' AVIF preview. You should report this to Microsoft.

There is workaround for Windows, but it requires halving resolution of color channels. I'd rather not do this, because it degrades color quality for everyone.

JSorngard commented 1 year ago

I see. The colored band is there when opened in Windows photo viewer and paint, but not when I open it in Firefox, so it seems its on Microsoft's end. Thank you for the fast answer!