I need the properties of this type definition
AUX_RGBImageRec
I need the properties of this type definition
AUX_RGBImageRec
glaux.h is always a good source to find out stuff like that.
/*
** RGB Image Structure
*/typedef struct _AUX_RGBImageRec {
GLint sizeX, sizeY;
unsigned char *data;
} AUX_RGBImageRec;
i have an image loaded with this:
AUX_RGBImageRec *TextureImage[1];
memset(TextureImage,0,sizeof(void *)*1);
TextureImage[0]=LoadBMP(“Textures/Brick/tuile1.bmp”)
is there a way for me to get the perpixel data of the bitmap?
That’s where the data member would come in.
I don’t know if there is a real manual for it other then the help files on the VC++ CD.
You can try Microsoft help, since it is their library.
or a google search.
Originally posted by jacky_cheecheo:
[b]I need the properties of this type definition
AUX_RGBImageRec[/b]
Hi Deiussum,
Can you pls. elaborate what you mean by that…I don’t really understand what you’re trying to say!!!
What i need is to get the value of each of the pixels in the data! Is is even possible?
What I mean is, all the pixel data is in the AUX_RGBImageRec::data member.
Maybe some code would explain:
struct RGBColor
{
unsigned char r, g, b;
};RGBColor GetPixelColor(AUX_RGBImageRec* pImg, int x, int y)
{
RGBColor results;
int index = (x+y*pImg->Width)*3;results.r = pImg->data[index];
results.g = pImg->data[index+1];
results.b = pImg->data[index+2];return results;
}void main()
{
AUX_RGBImageRec* pImg = auxRGBImageLoad(“someimage.bmp”);
RGBColor color = GetPixelColor(pImg, 0, 0);
cout << color.r << “,” << color.g << “,” << color.b << endl;
}
Thank you Deiussum! That is exactly what i need…