Closed rsuu closed 2 months ago
This fails CI because of #35. I.e. it's unrelated to the PR.
Thanks for the PR, I'll try to review it later when I have time.
My main thought at the moment without reviewing is what is the use case for this change? I don't know if having 2 return values for HEIF and HEIC is helpful.
That because image_type()
is now always return Heif
on .heic
and .avif
.
match ... {
// before
// failed: because HEIF is unsupported by image crate
ImageType::Heif => image::open( .avif or .heic ),
// after
ImageType::Heic => heic::open(),
ImageType::Avif => image::open(),
}
Thanks, that makes sense to me.
Initial pass seems probably fine, but I want to take some time to do a code style pass and probably run a fuzzer on it to make sure there aren't any obvious edge cases.
We use imagesize
for a file transfer tool with UI.
We want to display the right icon for each file type and we do have different icons for HEIF and HEIC.
I.e. for us this would be cool to have, even though we're not connected to this PR.
Now, return Avif for .avif and Heic for .heic/heif.