surface_save

Saves a surface to disc.

Syntax:

GML Code Example

surface_save(surface_id, fname);


Argument Description
surface_id The ID of the surface to set as the drawing target.
fname The name of the saved image file.


Returns: N/A


Description

This function will save a surface to disc using the given filename. The surface must be saved as a *.png format file.


Example:

GML Code Example

if keyboard_check_pressed(ord("S")
    {
    surface_save(surf, "test.png");
    }
 

The above code will check to see if the user presses the "S" key on the keyboard and if they do it will save the surface indexed in the variable "surf" to disc.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here