Hi guys,
I’ve got a bit of a weird error in my code, I’m loading a bitmap into an AUX_RGBImageRec structure and then trying to read the data out of the data array and into my own array so I can play around with it but I only seem to be accessing the first member of the array then it stops rather than running through the whole array (of size width x height x 3). Heres the code I think its something stupid but I can’t see it…
int SizeOfArray = 0;
unsigned char *DataArray;
int Counter = 0;
AUX_RGBImageRec *TextureImage;
// Load The Bitmap, Check For Errors, If Bitmap’s Not Found Quit
if ( TextureImage=LoadBMP(FileLocation) )
{
// calculate size of data array required
SizeOfArray = TextureImage->sizeXTextureImage->sizeY3;
// alocate data array of required size
DataArray = new unsigned char[SizeOfArray];
// fill output array
for( Counter=0 ; Counter<SizeOfArray ; Counter++ );
{
DataArray[Counter] = TextureImage->data[Counter];
}
}
cheers,
Convict@Large