When I need to play around with BMP images, I jump straight to Jim's BMP function. However, when I want to build the code as a single EXE with no external files, I need to fiddle about to do some converting.
I wrote this little program which uses Jim's function to load the BMP file into an array and then writes it straight out to a BAS file ready for including into your own program as a UINTEGER array.
All you need to do is change the following three lines and run it (as long as your source image is in the same directory)
INFILENAME="your_source_file.bmp"
OUTFILENAME="your_output_file.bas"
ARRAYNAME="what_you_want_to_call_the_array"
So for example, if you had an image file called monkey.bmp and you wanted it to be saved in a file called monkey.bas and when included in your main code it should be filling an array called BIGPICTURE, you would set the lines to be:
INFILENAME="monkey.bmp"
OUTFILENAME="monkey.bas"
ARRAYNAME="BIGPICTURE"
And then compile and run it.
It's not very clever, but it does what it sets out to do.



