Merge pull request #2716 from Zarthus/master
Bump image from `0.24` to `0.25`
This commit is contained in:
commit
a773e44b61
3 changed files with 559 additions and 239 deletions
792
Cargo.lock
generated
792
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -155,7 +155,7 @@ glam = "0.25"
|
||||||
glyphon = { git = "https://github.com/hecrj/glyphon.git", rev = "09712a70df7431e9a3b1ac1bbd4fb634096cb3b4" }
|
glyphon = { git = "https://github.com/hecrj/glyphon.git", rev = "09712a70df7431e9a3b1ac1bbd4fb634096cb3b4" }
|
||||||
guillotiere = "0.6"
|
guillotiere = "0.6"
|
||||||
half = "2.2"
|
half = "2.2"
|
||||||
image = { version = "0.24", default-features = false }
|
image = { version = "0.25", default-features = false }
|
||||||
kamadak-exif = "0.5"
|
kamadak-exif = "0.5"
|
||||||
kurbo = "0.10"
|
kurbo = "0.10"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use std::path::Path;
|
||||||
/// This will return an error in case the file is missing at run-time. You may prefer [`from_file_data`] instead.
|
/// This will return an error in case the file is missing at run-time. You may prefer [`from_file_data`] instead.
|
||||||
#[cfg(feature = "image")]
|
#[cfg(feature = "image")]
|
||||||
pub fn from_file<P: AsRef<Path>>(icon_path: P) -> Result<Icon, Error> {
|
pub fn from_file<P: AsRef<Path>>(icon_path: P) -> Result<Icon, Error> {
|
||||||
let icon = image::io::Reader::open(icon_path)?.decode()?.to_rgba8();
|
let icon = image::ImageReader::open(icon_path)?.decode()?.to_rgba8();
|
||||||
|
|
||||||
Ok(icon::from_rgba(icon.to_vec(), icon.width(), icon.height())?)
|
Ok(icon::from_rgba(icon.to_vec(), icon.width(), icon.height())?)
|
||||||
}
|
}
|
||||||
|
|
@ -27,7 +27,7 @@ pub fn from_file_data(
|
||||||
data: &[u8],
|
data: &[u8],
|
||||||
explicit_format: Option<image::ImageFormat>,
|
explicit_format: Option<image::ImageFormat>,
|
||||||
) -> Result<Icon, Error> {
|
) -> Result<Icon, Error> {
|
||||||
let mut icon = image::io::Reader::new(std::io::Cursor::new(data));
|
let mut icon = image::ImageReader::new(std::io::Cursor::new(data));
|
||||||
|
|
||||||
let icon_with_format = match explicit_format {
|
let icon_with_format = match explicit_format {
|
||||||
Some(format) => {
|
Some(format) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue