links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 10:39 am UTC on 3 October 2020
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:).

 InspectorBrowser openOn: ImageMorph new

Read a graphic file from the disk and display it with an ImageMorph object

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

Note on usage

ImageMorphs should be favored over SketchMorphs. For the reason of this see see FAQ: Difference between SketchMorph and ImageMorph.

If you send the message asMorph to Form object you get an ImageMorph object.

To have the user select part of the screen and create a morph and find out the class of that morph evaluate
 Form fromUser asMorph class

If you actually want to see the ImageMorph object you have to evaluate the following

 Form fromUser asMorph openInWorld

How to store and image as code in a method

See example ImageCoderMorph (create an image from code stored in a method)