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.5.2 images are no longer valid according to windows #73

Closed JSorngard closed 1 year ago

JSorngard commented 1 year ago

Hi!

I just updated to cavif 1.5.2 from 1.5.0 and found that the final images produced by cavif are no longer valid according to the windows file explorer and image viewer. It is very possible that this is a bug in windows related to #60, but I want to flag it just in case.

It looks like this in file explorer: cavif_update_result The leftmost image was encoded with version 1.5.0, the middle is the original, and the rightmost image was encoded with 1.5.2. Attempting to open it results in this screen: open_file The text translates as "The file in the picture can not be opened as the format is not supported or the file is damaged". The image produced by the earlier version opens fine.

kornelski commented 1 year ago

Can you check 1.5.1 too?

JSorngard commented 1 year ago

With version 1.5.1 I get the same result: thumbnails BUNNY3.avif is the result of encoding with version 1.5.1. It looks the same when opened: open_bunny3

JSorngard commented 1 year ago

Also the 1.5.1 version is not available on crates.io so I downloaded the release from github, but maybe that is intentional?

kornelski commented 1 year ago

So this is probably from switching to 10-bit depth. I've released 1.5.3 with --depth=8 flag.

JSorngard commented 1 year ago

Using that flag fixes the issue.