Screen dump
Last updated at 7:26 pm UTC on 12 October 2019
GIFReadWriter putForm: Display onFileNamed: 'screenshot.GIF'.
PNGReadWriter putForm: Display onFileNamed: 'screenshot.png'.
Purpose:
The GIFReadWriter and PNGReadWriter class can encode and decode images to Squeak's internal Form format.
putForm:onFileNamed:
takes a Form and encodes a GIF or PNG from it.
Why This is Interesting:
The whole Display is just a Form. Actually, it's a DisplayScreen, which is a subclass of Form. You can send the whole thing to GIF, or just a window, or something cool that you draw.
Since version 2.7 there is:
Utilities grabScreenAndSaveOnDisk
And since version 3.9 you can take "snapshots" of the screen or any morph by shift clicking on the blue viewer halo.
- This gets you a clear screenshot (i.e. the halo handles are removed first).
- The "snapshot" can be resized.
- The "snapshot" thumbnail can be exported (as gif, jpeg, etc.) with the usual export feature via the red halo menu.
- An optional popup feature can be set where clicking on the snapshot will display the full sized morph image until the mouse is released.
See also
To write a picture of a Morph to a file see aMorph imageForm.