diff --git a/CHANGELOG.md b/CHANGELOG.md index 849a2697..6a508098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +- **Breaking:** `image` crate upgraded to 0.20. This is exposed as part of the `icon_loading` API. - On Wayland, pointer events will now provide the current modifiers state. - On Wayland, titles will now be displayed in the window header decoration. - On Wayland, key repetition is now ended when keyboard loses focus. diff --git a/Cargo.toml b/Cargo.toml index bfdcfc80..995ba03f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ icon_loading = ["image"] lazy_static = "1" libc = "0.2" log = "0.4" -image = { version = "0.19", optional = true } +image = { version = "0.20", optional = true } [target.'cfg(target_os = "android")'.dependencies.android_glue] version = "0.2" diff --git a/examples/window_icon.rs b/examples/window_icon.rs index 012faea9..5be1433e 100644 --- a/examples/window_icon.rs +++ b/examples/window_icon.rs @@ -6,10 +6,9 @@ extern crate winit; #[cfg(feature = "icon_loading")] extern crate image; -use winit::Icon; - #[cfg(feature = "icon_loading")] fn main() { + use winit::Icon; // You'll have to choose an icon size at your own discretion. On X11, the desired size varies // by WM, and on Windows, you still have to account for screen scaling. Here we use 32px, // since it seems to work well enough in most cases. Be careful about going too high, or @@ -37,7 +36,7 @@ fn main() { match event { CloseRequested => return winit::ControlFlow::Break, DroppedFile(path) => { - use image::GenericImage; + use image::GenericImageView; let icon_image = image::open(path).expect("Failed to open window icon"); diff --git a/src/icon.rs b/src/icon.rs index bbecf2c9..404fc295 100644 --- a/src/icon.rs +++ b/src/icon.rs @@ -146,7 +146,7 @@ impl Icon { /// Requires the `icon_loading` feature. impl From for Icon { fn from(image: image::DynamicImage) -> Self { - use image::{GenericImage, Pixel}; + use image::{GenericImageView, Pixel}; let (width, height) = image.dimensions(); let mut rgba = Vec::with_capacity((width * height) as usize * PIXEL_SIZE); for (_, _, pixel) in image.pixels() {