< index < 3. System layer | ===================================== 3.2 Easy screenshots ===================================== |

This function allows you to save the current game screen in a png file, or possibly a bmp file if you provide a filename ending with .bmp.

    C++ : static void TCODSystem::saveScreenshot(const char *filename)
    C   : void TCOD_sys_save_screenshot(const char *filename)
    Py  : sys_save_screenshot(filename)

Parameter | Description
--- | ---
filename | Name of the file. If NULL, a filename is automatically generated with the form "./screenshotNNN.png", NNN being the first free number (if a file named screenshot000.png already exist, screenshot001.png will be used, and so on...).

Example :

    C++ : TCODSystem::saveScreenshot(NULL);
    C   : TCOD_sys_save_screenshot("./screenshots/myscreen.png");
    Py  : libtcod.sys_save_screenshot("./screenshots/myscreen.png")