Loadimage (or anything) from memory
BlitzMax Forums/BlitzMax Programming/Loadimage (or anything) from memory
| ||
Is it possible to load an image from memory? My aim is to have a crypted ressource being decrypted by a game and then being loaded. ^_^ What is the simplest way to do this? (Note: Bmax 1.24 - can't upgrade because of project compatibility issue ;) ) |
| ||
Use a bank and load the image from there. LoadImage() accept a memory bank as a parameter. |
| ||
Or load it as a pixmap, you can load images from pixmaps too. |
| ||
Oh great, it works with memory banks!! Couldn't hope for anything better (if only i realised this earlier...!)imagebank:TBank = LoadBank ("image.bmp") image=LoadImage(imagebank) Graphics 640,480,0,60 Cls DrawImage image,0,0 Flip WaitKey() It says in the docs that url can be either a string or an existing pixmap. If only i knew that it also accepted banks, I wouldn't have bothered Incbining stuff!! lol Thanks you very much. |