Screen dump to GIF
Last updated at 9:34 pm UTC on 20 June 2006
GIFReadWriter putForm: Display onFileNamed: 'screenshot.GIF'
You need the fixes from Hans Martin Mosner to get the GIFReadWriter to work in 1.23 or earlier.
Purpose:
The GIFReadWriter class can encode and decode GIF images to Squeak's internal Form format.
putForm:onFileNamed:
takes a Form and encodes a GIF 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.
In 2.7 there is:
Utilities grabScreenAndSaveOnDisk
As of 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.