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

This reverts commit 55c897d993.
This commit is contained in:
Conrad Irwin 2024-04-02 12:59:10 -06:00
parent 55c897d993
commit c8b14ee2cb
9 changed files with 495 additions and 266 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_bgra8();
let data = image::load_from_memory_with_format(&bytes, format)?.into_rgba8();
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<usvg::Error>),
Usvg(Arc<resvg::usvg::Error>),
}
impl From<std::io::Error> for ImageCacheError {
@ -384,8 +384,8 @@ impl From<ImageError> for ImageCacheError {
}
}
impl From<usvg::Error> for ImageCacheError {
fn from(error: usvg::Error) -> Self {
impl From<resvg::usvg::Error> for ImageCacheError {
fn from(error: resvg::usvg::Error) -> Self {
Self::Usvg(Arc::new(error))
}
}