gpui: Update image dependency
The latest update to resvg bumped some transitive dependencies which lead to duplicates. The update to the image dependency unifies most of their versions again. Most notably, gif and kurbo are still duplicated, which is best fixed downstream however. Signed-off-by: Niklas Wimmer <mail@nwimmer.me>
This commit is contained in:
parent
007acc4bc2
commit
6a22c8a298
4 changed files with 360 additions and 115 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::{size, DevicePixels, Result, SharedString, Size};
|
||||
use anyhow::anyhow;
|
||||
use image::{Bgra, ImageBuffer};
|
||||
use image::RgbaImage;
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
fmt,
|
||||
|
@ -38,12 +38,12 @@ pub struct ImageId(usize);
|
|||
pub struct ImageData {
|
||||
/// The ID associated with this image
|
||||
pub id: ImageId,
|
||||
data: ImageBuffer<Bgra<u8>, Vec<u8>>,
|
||||
data: RgbaImage,
|
||||
}
|
||||
|
||||
impl ImageData {
|
||||
/// Create a new image from the given data.
|
||||
pub fn new(data: ImageBuffer<Bgra<u8>, Vec<u8>>) -> Self {
|
||||
pub fn new(data: RgbaImage) -> Self {
|
||||
static NEXT_ID: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue