mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 01:25:38 +00:00
Small adjustments to the miximage screenshot frame.
This commit is contained in:
parent
75430f210a
commit
a9a6b606db
|
@ -796,9 +796,11 @@ void MiximageGenerator::sampleFrameColor(CImg<unsigned char>& 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.
|
||||
// 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.2f, 0.0f, 1.0f);
|
||||
colorHSL(0, 0, 0, 2) = Math::clamp(lightness * 1.25f, 0.10f, 1.0f);
|
||||
|
||||
const CImg<unsigned char> colorRGB = colorHSL.HSLtoRGB();
|
||||
|
||||
|
|
Loading…
Reference in a new issue