GLBasic User Manual

Main sections


SAVESPRITE file$, num%

Saves the sprite with id = num% to the file file$ in BMP/PNG format.
The image will be saved as a 24-bit color image on all platforms.

// SaveSprite
FOR i = 0 TO 1000
    SETPIXEL RND(100), RND(100), RND(1677215)
GRABSPRITE 0, 0,0, 100,100
SAVESPRITE "ugly.bmp", 0
SAVESPRITE "ugly.png", 0

// MSPaint?
SHELLCMD("explorer.exe ugly.bmp", FALSE, TRUE, i)

See also...