Skip to main content

The "surface_write" Function

Syntax#

surface_write(surf);
ArgumentTypeDescription
surfsurfaceThe surface to encode as a string

Description#

Returns a surface as a base64-encoded string. Use surface_read to convert back into a surface. Especially useful for save files and networking.

Example#

ini_open(working_directory + "save.dat");
ini_write_string("data", "screenshot", surface_write(application_surface));
ini_close();