From a9a6b606db54dcb6d1b5f476266652a3f6bbb2e6 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 11 Jun 2021 17:23:46 +0200 Subject: [PATCH] Small adjustments to the miximage screenshot frame. --- es-app/src/MiximageGenerator.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/es-app/src/MiximageGenerator.cpp b/es-app/src/MiximageGenerator.cpp index d025c4b7d..05fb65263 100644 --- a/es-app/src/MiximageGenerator.cpp +++ b/es-app/src/MiximageGenerator.cpp @@ -796,9 +796,11 @@ void MiximageGenerator::sampleFrameColor(CImg& screenshotImage, float lightness = colorHSL(0, 0, 0, 2); // Decrease saturation slightly and increase lightness a bit, these adjustments - // makes the end result look better than the raw average pixel value. - colorHSL(0, 0, 0, 1) = Math::clamp(saturation * 0.9f, 0.0f, 1.0f); - colorHSL(0, 0, 0, 2) = Math::clamp(lightness * 1.2f, 0.0f, 1.0f); + // makes the end result look better than the raw average pixel value. Also clamp + // the lightness to a low value so we don't get a frame that is nearly pitch black + // if the screenshot mostly contains blacks or dark colors. + colorHSL(0, 0, 0, 1) = Math::clamp(saturation * 0.9f, 0.0f, 1.0f); + colorHSL(0, 0, 0, 2) = Math::clamp(lightness * 1.25f, 0.10f, 1.0f); const CImg colorRGB = colorHSL.HSLtoRGB();