Squeak
  links to this page:    
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
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.