Typically you would load the image file into memory using *LOAD (OSCLI "LOAD...") but alternatively, and perhaps more straightforwardly, you could load it into a string. Here's an example using one of the images from the supplied dibley.bbc program:
Code: Select all
REM Load the image into a string (do this just once):
bmpfile$ = @lib$ + "..\examples\games\.Graphics\1.BMP"
F% = OPENIN(bmpfile$)
bmp1$ = GET$#F% BY EXT#F%
CLOSE #F%
REM Display the image (typically multiple times):
*HEX 64
REPEAT
x% = RND(1200) : y% = RND(1000)
OSCLI "MDISPLAY " + STR$~PTR(bmp1$) + " " + STR$(x%) + "," + STR$(y%)
WAIT 10
UNTIL FALSE