term: avoid breaking animated webp images when resizing

refs: https://github.com/wez/wezterm/issues/3258
This commit is contained in:
Wez Furlong committed 2023-03-16 22:55:38 -07:00
1 parent 97452d0ccc
commit 587ceca98e
1 file changed
+4 -1
+4 -1
View File
@@ -95,7 +95,10 @@ impl TerminalState {
let downscaled = (width < info.width as usize) || (height < info.height as usize);
let data = match (downscaled, info.format) {
(true, ImageFormat::Gif) | (true, ImageFormat::Png) | (false, _) => {
(true, ImageFormat::Gif)
| (true, ImageFormat::Png)
| (true, ImageFormat::WebP)
| (false, _) => {
// Don't resample things that might be animations,
// or things that don't need resampling
ImageDataType::EncodedFile(image.data)