SaveBitmap


SaveBitmap bitmap, filename$

This command saves a bitmap to the sdcard. The variable bitmap is an object variable that contains the bitmap. The file extension determines the type of graphics file to be written. If the file name ends in ".png" as in "mypic.png" the file will be stored in the PNG format. If the file name ends in ".jpg" or ".jpeg" then the file will be stored in the JPEG format. PNG graphics files are the preferred format because they support transparency. JPG files will also work but they do not support transparency.


Example:


Graphics On
Color 40,40,40
CLS

ex = ScreenX()-1
ey = ScreenY()-1

' Draw something on the screen.
Color 100,0,0
Rect 0,0,ex,ey
Line 0,0,ex,ey
Line ex,0,0,ey

' Capture the screen to a bitmap.
bitmap = CopySurface()

' Save the screen capture to a file.
SaveBitmap bitmap, "ScreenCapture.png"

Wait 10000






CreateBitmap


LoadBitmap


DrawBitmap


CopySurface


CopyBitmap


SetDrawingSurface


GetBitmapWidth()


GetBitmapHeight()


GetBitmapPixel()


GetBitmapPixelRGBA()






Become a Patron