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

CAvif 1.3.0 creates invalid Avif files for Chrome #34

Closed mongeron closed 3 years ago

mongeron commented 3 years ago

After Chrome 92 arrived, many of the AVIF images on my websites started showing corrupt image icon in Chrome 92. Images were created with CAvif 0.6.0.

I updated CAvif to 1.3.0 and re-encoded all images. However, some of the AVIF images are still broken in Chrome 92.

I can provide sample images of original JPEG files and broken AVIF files if needed.

kornelski commented 3 years ago

Can you share an example image and exact Chrome version?

mongeron commented 3 years ago

https://www.bonusfinder.com/images/rsz_caesars07262021-800x331.jpg.avif contains the broken encoded image, https://www.bonusfinder.com/images/rsz_caesars07262021-800x331.jpg contains the original source image.

Command line used for conversion:

cavif -f -s 1 -Q 55 rsz_caesars07262021-800x331.jpg -o rsz_caesars07262021-800x331.jpg.avif

Chrome:

Google Chrome is up to date Version 92.0.4515.107 (Official Build) (x86_64)

Operating system is MacOS.

The image is generated as part of finding optimal quality value to meet desired DSSIM quality. As part of the process, I use avifdec to create PNG version of the compressed image for DSSIM comparison to original. Avifdec seems to process the image properly.

kornelski commented 3 years ago

I can't reproduce it. The AVIF file looks like from an older version.

kukulich commented 3 years ago

Btw we had also problems with Chrome 92 but upgrade to 1.3.0 fixed it for us.

mongeron commented 3 years ago

I am pretty sure it was generated using the newer version, but I will double-check.

mongeron commented 3 years ago

It was indeed encoded by the old version, sorry for the false alarm.

kornelski commented 3 years ago

Phew