Here's the required files to link my dll to your program. I have also included the static library if you would like toink it that way as well. Everything is pretty self-explanatory, but if you have any more questions, just post them here. To use it to decode BLP's, use unsigned char* BLP2DECODE_BLP2toRGBA(blp2header *b, unsigned char* in, unsigned long insize, unsigned long *outsize, palette p, unsigned long width, unsigned long height); blp2header *b (in) - pointer to the BLP2 header unsigned char* in (in) - BLP2 image data unsigned long insize (in) - size of the input buffer unsigned long *outsize (out) - size of the output buffer palette p (in) - palette structure, if the BLP is paletted unsigned long width (in) - width of the BLP unsigned long height (in) - height of the BLP For reference on the BLP2 format //------------------------------------------------------- //header structure //------------------------------------------------------- struct blp2header { char ident[4]; int type; char flags[4]; int width; int height; int mipmapoffsets[16]; int mipmaplengths[16]; }; //------------------------------------------------------- //ident 4 bytes should be BLP2 //type 4 bytes 0 if data is jpg, 1 if paletted or DXT //unknown 4 bytes hold flags //width 4 bytes width of original texture //height 4 bytes height of original texture //mipmapoffsets 4x16 bytes holds the offset of each mipmap's image data //mipmaplengths 4x16 bytes holds the length of each mipmap's image data //------------------------------------------------------- //------------------------------------------------------- //BLP2 Palette //------------------------------------------------------- struct blp2palette { unsigned int[256]; }; //------------------------------------------------------- //Each integer is a 4 byte RGBA value, 1 byte for each. //------------------------------------------------------- The file structure goes as follows. [header] [palette] [mipmapdata] The mipmap data varies depending on the flags: If flags[0] is1, then the image is paletted rgba. Each byte in the mipmap data sections will point to a palette entry. the other flag entries after this have not been figured out, but are not needed to convert. If flags[0] is 2, the the image is in DXT format, a Direct X texture format based off of DDS. If flags[1] is 8, then the DXT format is DXT3. If flags[1] is NOT 8, then the format is DXT1; We have still yet to see a JPG BLP2. The JPG BLP2 data should be raw JPG data in each mipmap section, but we will have to wait and see. Also, some of the paletted BLP2's datalengths are not correct. It's reccommended that you build your own size list and use that to determine how long the data section should be. The good thing is that the offsets are always right. Oh, I almost forgot about this part. After you call either the encode or decode function and get your data, make sure you call the free_data function before making another encode or decode function call. Also, it's a good idea to call the free_all function before exiting the program.