Skip to content

surface_save_ext

Vašek edited this page Jan 18, 2019 · 1 revision

surface_save_ext

Saves a surface in a png format with a specific width and height

Syntax:

surface_save_ext(surface_id, fname, width, height)
Argument Description
RenderTarget2D surface_id The ID of the surface
string fname Name for the surface
int width Required width of the saved file
int height Required height of the saved file

Returns: void

Description:

This function saves a scaled surface like a picture in a png format. The picture will have a specified width and height by your arguments.

Example:

RenderTarget2D surf = surface_create(2048, 2048);
surface_save_ext(surf, "Surface2", 1024, 1024);

This function will create new surface surf and then save it half sized like a file called Surface2.png.

Back to surfaces

Clone this wiki locally