Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
ThumbnailMorph
Last updated at 10:33 am UTC on 25 August 2016
A ThumbnailMorph is a SketchMorph. It can be created based on another morph or on an external file.

Example 1: Create a thumbnail of the World:

((Thumbnail new maxWidth: 200 minHeight: 120)
makeThumbnailFromForm: World imageForm)
openInWorld

Example 2: Create a thumbnail from a Windows BMP bitmap graphics file:

 ((Thumbnail new maxWidth: 240 minHeight: 150) 
 makeThumbnailFromForm:
 (Form fromBMPFileNamed: 'E:\Paint\bitmaps\Garten.bmp'))
 openInWorld

Example 3: Create a thumbnail from a JPG file:

 ((Thumbnail new maxWidth: 400 minHeight: 250) 
 makeThumbnailFromForm:
 (Form fromFileNamed: 'E:\Paint\scan\Baeume.jpg'))
 openInWorld

Actually this works for BMP files as well, so there is no need to use the message #fromBMPFileNamed: .