1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-05-12 08:00:12 +00:00
1 G2D.SaveImage
boxgaming edited this page 2023-05-12 11:49:27 -05:00

Saves an image to the virtual filesystem in PNG format.

Syntax

G2D.SaveImage img&, filepath$

Parameters

  • The img& parameter is the id of the image to save.
  • The filepath$ parameter indicates the location on the virtual file system where the image file will be saved.

Examples

Example1: Save the screen image to a file.

Import G2D From "lib/graphics/2d.bas"

Screen _NewImage(400, 400)

Randomize Timer
Dim i As Integer
For i = 1 To 1000
    Circle (Rnd * _Width, Rnd * _Height), Rnd * 100 + 10, Rnd * 15 + 1
Next i

G2D.SaveImage _Dest, "circles.png"