You can also write your own loader. But you need to know how the information in a BMP is stored. I would recommend you to go to
http://www.wotsit.org and see which image you would like to use.
I found out that BMP is the easiest to use.
It's something like.....you can use a DirectDrawSurface, or something else (note that I've used DirectDrawSurfaces)
Note pdata is the start of the image.
code:
//Copy 888 .BMP image to 1555 DirectDraw texture surface in video //memory, converting as we go. BMP data is stored bottom to top //(i.e., from left to right along a row, but the rows are//stored bottom to top in memory). For applications that support //multiple texture formats, this code fragment can be broken //out into a separate function, and then copied and modified //for each supported texture format. unsigned char r,g,b;unsigned char *oldpdata;unsigned short color1555;unsigned short *texSurfBase;int x, y;int skip; //actual vs. asked for surface width int imageWidthInBytes; oldpdata = pdata;texSurfBase = (unsigned short *)ddsd.lpSurface;imageWidthInBytes = BMPh->biWidth*IMAGEDEPTH_IN_BYTES;skip = ddsd.lPitch - BMPh->biWidth*COLORDEPTH_IN_BYTES; //start at beginning of last row of imagepdata += BMPh->biHeight*imageWidthInBytes - imageWidthInBytes; for (y=0; ybiHeight; y++){ for (x=0; xbiWidth; x++) { b = *pdata++; g = *pdata++; r = *pdata++; color1555 = (unsigned short)( ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) ); *texSurfBase++ = color1555; } //go to next row of texture surface texSurfBase += skip; //go to start of previous row (i.e., go back //two rows worth of bytes, the one just completed, //and the one we want to get to the start of... pdata -= imageWidthInBytes*2; } pdata = oldpdata; //reset pdata's original address
------------------
Dance with me......