I'm trying to load a png file into a surface, being the source in the memory with:
being xxxx the pointer to the file in memory
but there's no way to make it work. I keep getting a "0x...070" error code, INVALID_BITMAP.
First I thought my decompression code was not working correctly, however I decided to bin2c a png file and put it embedded in the code, and supply the len parameter at the correct file length, however the function still fails to load the file. the file is about 2KBs.
It works flawlessly in win32 and pocket pc
Any hints?
TIA
Kak
------- modify
p.s. the same code but using bmps instead of pngs works perfectly too :)
- Code:
rv=font[0].CreateSurface (GDSURFACE_SYSTEMMEMORY,(BYTE *)xxxx,len);
being xxxx the pointer to the file in memory
but there's no way to make it work. I keep getting a "0x...070" error code, INVALID_BITMAP.
First I thought my decompression code was not working correctly, however I decided to bin2c a png file and put it embedded in the code, and supply the len parameter at the correct file length, however the function still fails to load the file. the file is about 2KBs.
It works flawlessly in win32 and pocket pc
Any hints?
TIA
Kak
------- modify
p.s. the same code but using bmps instead of pngs works perfectly too :)