Revert "Revert "Revert dependency updates in #9836 (#10089)""

This reverts commit c8b14ee2cb.
This commit is contained in:
Conrad Irwin 2024-04-02 13:12:38 -06:00
parent c8b14ee2cb
commit 9317fe46af
9 changed files with 267 additions and 496 deletions

View file

@ -330,7 +330,7 @@ impl Asset for Image {
};
let data = if let Ok(format) = image::guess_format(&bytes) {
let data = image::load_from_memory_with_format(&bytes, format)?.into_rgba8();
let data = image::load_from_memory_with_format(&bytes, format)?.into_bgra8();
ImageData::new(data)
} else {
let pixmap =
@ -369,7 +369,7 @@ pub enum ImageCacheError {
Image(Arc<ImageError>),
/// An error that occurred while processing an SVG.
#[error("svg error: {0}")]
Usvg(Arc<resvg::usvg::Error>),
Usvg(Arc<usvg::Error>),
}
impl From<std::io::Error> for ImageCacheError {
@ -384,8 +384,8 @@ impl From<ImageError> for ImageCacheError {
}
}
impl From<resvg::usvg::Error> for ImageCacheError {
fn from(error: resvg::usvg::Error) -> Self {
impl From<usvg::Error> for ImageCacheError {
fn from(error: usvg::Error) -> Self {
Self::Usvg(Arc::new(error))
}
}