file_for_screen (STRING* filename,var number);

Takes a screenshot from the screen back buffer and saves it into an image file. The number is attached to the file name.


filename - name of the image file to save, with optional extension.
number - number to be attached to the file name.


JPG, BMP, DDS (uncompressed), and PNG image formats are supported. The default is JPG.
The file is saved in the saved games folder (-> save_dir).
The screenshot is not taken immediately, but one frame after the instruction. Only one screenshot per frame can be saved.
The file format is the same as the format of the screen buffer, therefore BMP files are often saved in an unusual 32 bit ARGB format that can't be read by the engine, and by many paint programs like Photoshop™.




file_for_screen("shot.png",123);  // saves a screenshot to "shot123.png"

See also:

bmap_for_screen, save_dir