AlphaComposer¶
This page describes the class AlphaComposer
The class AlphaComposer
provides methods to alpha-overlay uchar
or double
arrays.
After initialisation you call the methods addMatrix()
and addPNGData()
to add layers.
- Code:
Public Methods¶
createInstance
¶
static AlphaComposer *createInstance(int iW, int iH);
iW
Width of image data.
iH
Height of image data.
Prepares a png data target array.
destructor
¶
~AlphaComposer();
The destructor deletes the png data target array.
addMatrix
¶
uchar **addMatrix(double **ppdData, LookUp *pLU);
ppData
A
iW
xiH
array of doubles. each element is a simple value (no color data).pLU
A color lookup table
- The lookup table translates the elements from
ppData
to red, green, blue and alpha values, which are added to the png data target array.
addPNGData
¶
uchar **addPNGData(uchar **ppdData);
ppdData
An array holding the rgba values as
uchar
. The actual array format isiH x 4*iW
, where the 4 rgbauchar
values are written one after the other. (aucData[13][4*25]
: red value for pixel (13,25),aucData[13][4*25+2]
: blue value for pixel (13,25)).
Adds the data from ppData
to the png data target array.
addPNGDataPar
¶
uchar **addPNGDataPar(uchar **ppdData);
ppdData
An array holding the rgba values as
uchar
. The actual array format isiH x 4*iW
, where the 4 rgbauchar
values are written one after the other. (aucData[13][4*25]
: red value for pixel (13,25),aucData[13][4*25+2]
: blue value for pixel (13,25)).
Basically, a parallelized version of addPNGData()
.
clear
¶
void clear();
Clears the png data target array.
getData
¶
uchar **getData();
Returns the contents of the png data target array.