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

@ -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,
@ -43,12 +43,12 @@ pub(crate) struct RenderImageParams {
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 {