FreeBSD Manual Pages
save_screenshot(3) Arcan Lua API save_screenshot(3) NAME save_screenshot - Store a copy of the current display to a file. SYNOPSIS nil save_screenshot( dstres, fmt, srcid, local ) DESCRIPTION This function creates a file of the latest drawn output on the primary dis- play or of the contents of a specific VID of specified in srcid . Local (default, false) set to true or non-zero hints that the local storage should be used. This is important when there is a discrepancy between what is stored as the objects video backing store (implementation defined) and the local copy as they are not always in synch. The format setting is by default FORMAT_PNG but can also be FORMAT_PNG_FLIP , FORMAT_RAW 8, FOR- MAT_RAW 24 or FORMAT_RAW 32 though the RAW formats are primarily for ad- vanced use and debugging purposes. NOTES 1 For specific contexts, primarly calctargets, the contents of the non-local storage is not accessible on all graphic subsystems for all srcids as the calctarget may occupy or bind the same slot. Ei- ther do the call outside such a scope or force local readback. EXAMPLE function save_screenshot0() show_image(fill_surface(64, 64, 255, 0, 0)); local a = fill_surface(64, 64, 0, 255, 0); move_image(a, VRESW - 64, 0); local b = fill_surface(64, 64, 0, 0, 255); move_image(b, 0, VRESH - 64); local c = fill_surface(64, 64, 0, 255, 255); move_image(c, VRESW - 64, VRESH - 64); show_image({a, b, c}); end resource August 2026 save_screenshot(3)
NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=save_screenshot&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
