term: avoid breaking animated webp images when resizing
refs: https://github.com/wez/wezterm/issues/3258
This commit is contained in:
1 file changed
+4
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user