Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
ImageMorph
Last updated at 12:25 pm UTC on 14 September 2016
ImageMorph is a direct subclass of Morph. An ImageMorph object has an additional instance variable image where a Form is kept (accessors #form, #image, #image:).

To get an ImageMorph object from a file evaluate
 (Form fromFileNamed: 'myGraphicsFileName') asMorph openInWorld

ImageMorphs should be favored over SketchMorphs.

If you send the message asMorph to an instance of Form you get an ImageMorph.
 Form fromUser asMorph openInWorld

see FAQ: Difference between SketchMorph and ImageMorph
Example ImageCoderMorph (create an image from code stored in a method)