mirror of
https://github.com/wez/wezterm.git
synced 2024-11-21 18:12:23 +03:00
cargo update
plus some noise around the image crate api evolving and deprecating some type aliases.
This commit is contained in:
parent
9f5c2adb29
commit
56a27e93a9
441
Cargo.lock
generated
441
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -200,7 +200,7 @@ pub fn extract_colors_from_image<'lua>(
|
||||
}
|
||||
|
||||
log::trace!("loading image {file_name}");
|
||||
let im = image::io::Reader::open(&file_name)
|
||||
let im = image::ImageReader::open(&file_name)
|
||||
.map_err(|err| mlua::Error::external(format!("{err:#} while loading {file_name}")))?
|
||||
.decode()
|
||||
.map_err(|err| {
|
||||
|
@ -297,7 +297,7 @@ pub(crate) struct ImageInfo {
|
||||
}
|
||||
|
||||
pub(crate) fn dimensions(data: &[u8]) -> anyhow::Result<ImageInfo> {
|
||||
let reader = image::io::Reader::new(std::io::Cursor::new(data)).with_guessed_format()?;
|
||||
let reader = image::ImageReader::new(std::io::Cursor::new(data)).with_guessed_format()?;
|
||||
let format = reader
|
||||
.format()
|
||||
.ok_or_else(|| anyhow::anyhow!("unknown format!?"))?;
|
||||
|
@ -344,7 +344,7 @@ impl ImageDataType {
|
||||
pub fn dimensions(&self) -> Result<(u32, u32), InternalError> {
|
||||
fn dimensions_for_data(data: &[u8]) -> image::ImageResult<(u32, u32)> {
|
||||
let reader =
|
||||
image::io::Reader::new(std::io::Cursor::new(data)).with_guessed_format()?;
|
||||
image::ImageReader::new(std::io::Cursor::new(data)).with_guessed_format()?;
|
||||
let (width, height) = reader.into_dimensions()?;
|
||||
|
||||
Ok((width, height))
|
||||
|
@ -243,7 +243,7 @@ fn record_to_cairo_surface(paint_ops: Vec<PaintOp>) -> anyhow::Result<(Recording
|
||||
extents,
|
||||
} => {
|
||||
let image_surface = if format == IS_PNG {
|
||||
let decoded = image::io::Reader::new(std::io::Cursor::new(image.as_slice()))
|
||||
let decoded = image::ImageReader::new(std::io::Cursor::new(image.as_slice()))
|
||||
.with_guessed_format()?
|
||||
.decode()?;
|
||||
|
||||
|
@ -9,9 +9,8 @@ use ::window::{Point, Rect};
|
||||
use anyhow::Context;
|
||||
use config::{AllowSquareGlyphOverflow, TextStyle};
|
||||
use euclid::num::Zero;
|
||||
use image::io::Limits;
|
||||
use image::{
|
||||
AnimationDecoder, DynamicImage, Frame, Frames, ImageDecoder, ImageFormat, ImageResult,
|
||||
AnimationDecoder, DynamicImage, Frame, Frames, ImageDecoder, ImageFormat, ImageResult, Limits,
|
||||
};
|
||||
use lfucache::LfuCache;
|
||||
use once_cell::sync::Lazy;
|
||||
@ -239,7 +238,7 @@ impl FrameDecoder {
|
||||
let (tx, rx) = sync_channel(2);
|
||||
|
||||
let buf_reader = lease.get_reader().context("lease.get_reader()")?;
|
||||
let reader = image::io::Reader::new(buf_reader)
|
||||
let reader = image::ImageReader::new(buf_reader)
|
||||
.with_guessed_format()
|
||||
.context("guess format from lease")?;
|
||||
let format = reader
|
||||
@ -261,7 +260,7 @@ impl FrameDecoder {
|
||||
}
|
||||
|
||||
fn run_decoder_thread(
|
||||
reader: image::io::Reader<BoxedReader>,
|
||||
reader: image::ImageReader<BoxedReader>,
|
||||
format: ImageFormat,
|
||||
tx: SyncSender<DecodedFrame>,
|
||||
) -> anyhow::Result<()> {
|
||||
|
@ -384,7 +384,7 @@ impl ImgCatCommand {
|
||||
}
|
||||
|
||||
fn image_dimensions(data: &[u8]) -> anyhow::Result<ImageInfo> {
|
||||
let reader = image::io::Reader::new(std::io::Cursor::new(data)).with_guessed_format()?;
|
||||
let reader = image::ImageReader::new(std::io::Cursor::new(data)).with_guessed_format()?;
|
||||
let format = reader
|
||||
.format()
|
||||
.ok_or_else(|| anyhow::anyhow!("unknown image format!?"))?;
|
||||
|
Loading…
Reference in New Issue
Block a user