mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-20 01:13:04 +01:00
fix(codecs): initialize craft_heif::Options with ..Default::default()
This commit is contained in:
1 parent
9381392579
commit
4e7c9d74af
1 file changed
+1
-1
@@ -57,7 +57,7 @@ pub(crate) fn decode(bytes: &[u8], opts: &DecodeOptions) -> Result<Decoded> {
|
||||
if (info.width as u64).saturating_mul(info.height as u64) > opts.max_pixels {
|
||||
return Err(Error::TooLarge(info.width as u64, info.height as u64));
|
||||
}
|
||||
let options = craft_heif::Options { max_pixels: opts.max_pixels, apply_transforms: true };
|
||||
let options = craft_heif::Options { max_pixels: opts.max_pixels, apply_transforms: true, ..Default::default() };
|
||||
// A small decode (a thumbnail or a cataloguing probe) uses the file's own thumbnail image when
|
||||
// it is at least as large as asked: iPhones store one of 320 × 240, and decoding it is a
|
||||
// hundredth of the work of the 12 MP photo.
|
||||
|
||||
Reference in new issue
Block a user