Add Gamma correction in palette editor

Particularly useful when working for platforms with non-linear palettes.
For example the Thomson TO8 has a Gamma correction of 2.8, so the
darkest shade of color is already very bright. It is important to take
this into account when drawing pictures to avoid bad surprises when
showing them on the real machine.

The setting is available from the command line, or from the extended
palette window, which gets a little relayout using horizontal sliders
now that these are available.
This commit is contained in:
Adrien Destugues
2017-03-19 09:05:58 +01:00
parent 2d4ad537ad
commit 32b3996cb8
3 changed files with 150 additions and 71 deletions

View File

@@ -33,6 +33,9 @@ void Set_palette_RGB_scale(int);
int Get_palette_RGB_scale(void);
/// Configure Gamma correction
void Set_palette_Gamma(int);
///
/// Scale a component (R, G or B) according to the current RGB graduations.
/// Returns the resulting value, in the [0-255] range.