-
Notifications
You must be signed in to change notification settings - Fork 12
G2D.SaveImage
boxgaming edited this page May 12, 2023
·
1 revision
Saves an image to the virtual filesystem in PNG format.
G2D.SaveImage img&, filepath$
- 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.
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"