mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-16 23:22:26 +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 }
|
data-url = { version = "0.1", optional = true }
|
||||||
serialize-to-javascript = "=0.1.1"
|
serialize-to-javascript = "=0.1.1"
|
||||||
infer = { version = "0.7", optional = true }
|
infer = { version = "0.7", optional = true }
|
||||||
png = { version = "0.16", optional = true }
|
png = { version = "0.17", optional = true }
|
||||||
ico = { version = "0.1", 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]
|
[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")]
|
#[cfg(feature = "icon-png")]
|
||||||
"png" => {
|
"png" => {
|
||||||
let decoder = png::Decoder::new(std::io::Cursor::new(bytes));
|
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();
|
let mut buffer = Vec::new();
|
||||||
while let Ok(Some(row)) = reader.next_row() {
|
while let Ok(Some(row)) = reader.next_row() {
|
||||||
buffer.extend(row);
|
buffer.extend(row.data());
|
||||||
}
|
}
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
rgba: buffer,
|
rgba: buffer,
|
||||||
width: info.width,
|
width: reader.info().width,
|
||||||
height: info.height,
|
height: reader.info().height,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_ => panic!(
|
_ => panic!(
|
||||||
|
Loading…
Reference in New Issue
Block a user