You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is now, WindowBuilder::with_window_icon() and winit::Icon have API's that use various types from the image crate: image::image::ImageError, image::image::ImageFormat, some of the From impl's for Icon, etc.
These all use the version of image that winit uses, 0.19, and so if you want to use that functionality you have to use the same version of image. This isn't really a huge problem, but is kind of inconvenient. Perhaps winit could at least re-export that version of the image crate? I dunno what the best solution is without just newtype'ing all the types to hide them.
The text was updated successfully, but these errors were encountered:
Bitten by this again. Even more mysteriously, Icon::from_rgba() returns Result<Self, winit::BadIcon>, while every other Icon thing returns Result<Self, image::ImageError>. Heck!
The reason Icon::from_rgba() doesn't return image::ImageError is because none of its code actually goes through the image crate - it does a couple of internal integrity checks then passes the raw data directly to the active windowing backend. I'm pretty sure the image functionality just exists for convenience, though I could be wrong about that (cc @francesca64).
Honestly, I'm kinda tempted to remove the image integration altogether, as icon setting works perfectly fine without it through from_rgba(). Additionally, publicly exposing an image dependency means we can't stabilize until image can, and we've gotten so many issues about having an out-of-date image version that I can't image it's more convenient than having people just write a couple lines of file-loading code themselves.
As it is now,
WindowBuilder::with_window_icon()
andwinit::Icon
have API's that use various types from theimage
crate:image::image::ImageError
,image::image::ImageFormat
, some of theFrom
impl's forIcon
, etc.These all use the version of
image
thatwinit
uses, 0.19, and so if you want to use that functionality you have to use the same version ofimage
. This isn't really a huge problem, but is kind of inconvenient. Perhapswinit
could at least re-export that version of theimage
crate? I dunno what the best solution is without just newtype'ing all the types to hide them.The text was updated successfully, but these errors were encountered: