Due to: https://github.com/zed-industries/zed/issues/9985 and an abundance of caution, I'm reverting the image and svg rendering updates for now until we can debug the issue. cc: @niklaswimmer Release Notes: - N/A
This commit is contained in:
parent
6121bfc5a4
commit
55c897d993
9 changed files with 267 additions and 496 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue