SCRYDOSBox-XReferenceScreenAlso in MAME
The Screen tools
These tools read the screen at a stop, from video memory, without running the machine or changing it. screen_view shows it, palette lists its colours, and screen_signature answers a short hash of it, so two screens can be told the same without comparing pictures.
A palette index, the number a pixel holds in place of a colour, is named pen in the arguments and the fields.
The picture a reply attaches
A picture is written as a PNG and attached to the reply after its JSON; image names the file either way. With no dest it goes to the session's temporary folder, which close deletes.
Past 1568 pixels a side, or 1568 tiles of 28 pixels, a client's image input resamples a picture, and resampled pixel art looks right and is wrong. Such a picture is written and not attached, and not_inlined says why: ask for a crop or a smaller scale.
The default scale is the largest whole factor that fits, so each pixel stays a square of one colour. A picture inside a step of perform is never attached: only a reply's own picture is.
The tools
paletteRead the colours the palette holds now, as a list and as a picture of colour swatches.screen_viewRead the screen at a stop: its text or its picture, the pixels that hold chosen palette indices, the indices in use, or one pixel.screen_signatureGet a short hash of what the screen shows, so two screens can be told the same without comparing pictures.