From a107395707e618fadd4ce8aa409afb626879e98f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 14 Mar 2024 10:03:54 +0800 Subject: [PATCH] Logo (Chafa): fix blurry result when specifying both width and height Who knows why it was coded like that Fix #757 --- CHANGELOG.md | 1 + src/logo/image/image.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d4a9c8d..a1847c0be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Bugfixes: * Don't detect `SessionLeader` as terminal, actually (Terminal, Linux) +* Fix blurry chafa result when specifying both width and height (#757, Logo) Features: * Support new MacBook Air (Host, macOS) diff --git a/src/logo/image/image.c b/src/logo/image/image.c index 460ea3db0..12c7711f6 100644 --- a/src/logo/image/image.c +++ b/src/logo/image/image.c @@ -768,10 +768,8 @@ static bool printImageIfExistsSlowPath(FFLogoType type, bool printError) requestData.characterPixelWidth = 1; requestData.characterPixelHeight = 1; - if( - (type != FF_LOGO_TYPE_IMAGE_CHAFA || instance.config.logo.width == 0 || instance.config.logo.height == 0) && - !getCharacterPixelDimensions(&requestData) - ) { + if(!getCharacterPixelDimensions(&requestData)) + { if(printError) fputs("Logo: getCharacterPixelDimensions() failed", stderr); return false;