M
Marc Pelletier
Hello,
I am having trouble implementing the following callback:
CNCSError CECWCompressor::WriteReadLine(UINT32 nNextLine, void
**ppInputArray)
where ppInputArray is a 3 by x array. The length of x is not known at
compile time.
I can't seem to dereference ppInputArray in a way that the compiler is
happy with. This is what I would like to do, but I get a 'Cannot convert
from void* to float[]' error.
float Red[] = ppInputArray[0];
float Green[] = ppInputArray[1];
float Blue[] = ppInputArray[2];
for ( UINT32 x = 0; x < pInfo->nSizeX; x++ ) {
rgb = image.GetPixel( x, nNextLine );
Red[x] = (float)GetRValue( rgb );
Green[x] = (float)GetGValue( rgb );
Blue[x] = (float)GetBValue( rgb );
}
Every other permutation I can think of also cannot be converted for one
reason or another. How can I fill this structure?
Thanks for any help.
Marc Pelletier
I am having trouble implementing the following callback:
CNCSError CECWCompressor::WriteReadLine(UINT32 nNextLine, void
**ppInputArray)
where ppInputArray is a 3 by x array. The length of x is not known at
compile time.
I can't seem to dereference ppInputArray in a way that the compiler is
happy with. This is what I would like to do, but I get a 'Cannot convert
from void* to float[]' error.
float Red[] = ppInputArray[0];
float Green[] = ppInputArray[1];
float Blue[] = ppInputArray[2];
for ( UINT32 x = 0; x < pInfo->nSizeX; x++ ) {
rgb = image.GetPixel( x, nNextLine );
Red[x] = (float)GetRValue( rgb );
Green[x] = (float)GetGValue( rgb );
Blue[x] = (float)GetBValue( rgb );
}
Every other permutation I can think of also cannot be converted for one
reason or another. How can I fill this structure?
Thanks for any help.
Marc Pelletier