image-rs / image-webp

Apache License 2.0
41 stars 9 forks source link

WebP corruption issue: lossless RGB or lossy RGBA images are not supported. #113

Closed rohitmittapalli closed 4 days ago

rohitmittapalli commented 4 days ago

Prior to this change:https://github.com/image-rs/image/pull/2148 image-rs use the webp crate. This supported loss and lossless.

Looks like switching over to image-rs/image-webp we lost our ability to support lossless RGB and lossy RGBA images.

/// WebP Image format decoder. Currently only supports lossy RGB images or lossless RGBA images based on this comment. The docs do not reflect this.

fintelia commented 4 days ago

The doc comment is outdated and needs to be corrected. We've had full WebP decoding support for years now...

rohitmittapalli commented 4 days ago

Interesting. We have a file that seems to encode just fine using the webp crate but not image-rs. Assumed it was due to that comment but can keep investigating.

Other .webp files are working just fine.

https://drive.google.com/file/d/1FBc9uBA06t-F3JIHdrvKR3yBU4ZmPApE/view?usp=sharing

fintelia commented 4 days ago

Confirmed that this is a bug in image_webp. Image is corrupt due to missing color cache update.

Thanks for the report!

rohitmittapalli commented 3 days ago

@fintelia thank you for the incredibly fast fix! any chance we can cut a new release for this? have a bug this would fix :)