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

Invalid starting bytes of the final image #67

Closed kolserdav closed 1 year ago

kolserdav commented 1 year ago

I use this method https://github.com/kolserdav/ravif-js/blob/7ebd8539454ecd67c031f0aa251c21bf1539cbfd/src/lib.rs#L49 to encode images into .avif. The first four bytes of the resulting image are [0,0,0,24]. The remaining bytes are as they should be for file .avif. As a result, load_image can no longer determine the type of this .avif file.

kolserdav commented 1 year ago

It turns out, as I see now - it is provided. Just had to use the avif feature in load_image crate.