Argument Description surface_id The ID of the surface to set as the drawing target. fname The name of the saved image file.
This function will save a surface to disc using the given filename. The surface must be saved as a *.png format file.
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.