qimageblitz
colors.cpp File Reference
#include "qimageblitz.h"#include <config-processor.h>#include "private/inlinehsv.h"#include "private/blitz_p.h"#include "blitzcpu.h"#include <QVector>
Include dependency graph for colors.cpp:

Go to the source code of this file.
Variables | |
| static char | contrast_table [128] |
Variable Documentation
char contrast_table[128] [static] |
Initial value:
{
0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9,
10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17,
17, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23,
23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, 26, 26, 26,
26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
27, 26, 26, 26, 26, 26, 26, 26, 25, 25, 25, 25, 24, 24, 24,
23, 23, 23, 22, 22, 21, 21, 20, 20, 20, 19, 18, 18, 17, 17,
16, 16, 15, 14, 14, 13, 12, 11, 11, 10, 9, 8, 7, 7, 6, 5,
4, 3, 2, 1, 0
}
Precalculated increment values for HSV contrast.
Saves some expensive floating point math. These are half the integer results of:
alpha*(alpha*(sin(M_PI*(brightness-alpha))+1.0)-brightness)
where alpha is 0.5+M_EPSILON and brightness is the percentage for values ranging from 0 to 255, (Qt compatible HSV brightness values). The other half of the lookup table is the inverse of these values. I am so clever :) (mosfet)
Definition at line 54 of file colors.cpp.
KDE 4.4 API Reference