1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

glyphcache: avoid deprecated image method

There's one other that is slated for deprecation but that
doesn't have advice on how to replace it yet.

refs: https://github.com/image-rs/image/issues/1989
This commit is contained in:
Wez Furlong 2024-01-20 10:17:23 -07:00
parent fbc502252f
commit c23e957ee2
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -257,8 +257,11 @@ impl FrameDecoder {
ImageFormat::Gif => {
let mut reader = reader.into_inner();
reader.rewind().context("rewinding reader for gif")?;
let decoder = image::codecs::gif::GifDecoder::with_limits(reader, limits)
.context("GifDecoder::with_limits")?;
let mut decoder =
image::codecs::gif::GifDecoder::new(reader).context("GifDecoder::new")?;
decoder
.set_limits(limits)
.context("GifDecoder::set_limits")?;
decoder.into_frames()
}
ImageFormat::Png => {