diff --git a/crates/image-codecs/src/codecs/png.rs b/crates/image-codecs/src/codecs/png.rs index 6523d56474..e68c9acefe 100644 --- a/crates/image-codecs/src/codecs/png.rs +++ b/crates/image-codecs/src/codecs/png.rs @@ -1390,12 +1390,12 @@ fn start( if opts.embed_icc && let Some(icc) = icc { - info.icc_profile = Some(icc.clone().into()); + info.icc_profile = Some(std::borrow::Cow::Borrowed(icc.as_slice())); } if opts.embed_metadata { if let Some(exif) = &meta.exif { // The pixels are written as they are shown: never let a viewer rotate them again. - info.exif_metadata = Some(crate::resolution::export_exif(exif, meta.dpi).into_owned().into()); + info.exif_metadata = Some(crate::resolution::export_exif(exif, meta.dpi)); } if let Some((x, y)) = meta.dpi && x > 0.0