'$INCLUDE:'SaveImage.BI'
'draw something
file$ = "temp.bmp" 'the file to save to
image&
= _DISPLAY 'the file handle which you want to savestartx = 0 'the x/y coordinate of the top left portion of the screen which you want to capture
starty = 0
stopx
= _WIDTH 'the x/y coordinate of the bottom right portion of the screen which you want to capture
result = SaveImage(file$, image&, startx, starty, stopx, stopy)
PRINT result
'this gives us error codes, in case something goes wrong. '-1, in this case, says "All is good! No glitch in the export of a bmp file."
file$ = "temp.png" 'if we change the extension, we change what we export to disk
result = SaveImage(file$, image&, startx, starty, stopx, stopy)
PRINT result
'this gives us error codes, in case something goes wrong.
'just by changing the extension, we can save a screenshot in BMP, PNG, JPG, GIF format.
PRINT "COLOR "; i
, 15 - i
'And, as you can see, we work perfectly fine with SCREEN 0 TEXT images as well.
'$INCLUDE:'SaveImage.BM'