diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 8fa119348..ecc406eca 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -90,7 +90,7 @@ glob = "0.3" data-url = { version = "0.1", optional = true } serialize-to-javascript = "=0.1.1" infer = { version = "0.7", optional = true } -png = { version = "0.16", optional = true } +png = { version = "0.17", optional = true } ico = { version = "0.1", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index e27c3ca5f..dc088fd13 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -389,15 +389,15 @@ impl TryFrom for runtime::WindowIcon { #[cfg(feature = "icon-png")] "png" => { let decoder = png::Decoder::new(std::io::Cursor::new(bytes)); - let (info, mut reader) = decoder.read_info()?; + let mut reader = decoder.read_info()?; let mut buffer = Vec::new(); while let Ok(Some(row)) = reader.next_row() { - buffer.extend(row); + buffer.extend(row.data()); } Ok(Self { rgba: buffer, - width: info.width, - height: info.height, + width: reader.info().width, + height: reader.info().height, }) } _ => panic!(