mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-15 13:41:39 +03:00
chore(deps): update Rust crate png to 0.17
This commit is contained in:
parent
d112f2005a
commit
3d11ac656c
@ -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]
|
||||
|
@ -389,15 +389,15 @@ impl TryFrom<Icon> 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!(
|
||||
|
Loading…
Reference in New Issue
Block a user