aMorph imageForm
Last updated at 7:34 pm UTC on 12 October 2019
Every Morph gives access to its bitmap representation (Form) with the method
imageForm
To write the bitmap to a file use
"get an image"
morph := (ImageReadWriter formFromStream: (HTTPSocket httpGet: 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Aragonite-Sulfur-lw114a.jpg/309px-Aragonite-Sulfur-lw114a.jpg')) asMorph openInHand.
"write the form of the image morph"
PNGReadWriter putForm: morph imageForm onFileNamed: 'sulphur.png'.
or
JPEGReadWriter2 putForm: morph imageForm onFileNamed: 'sulphur.jpg'.
GIFReadWriter putForm: morph imageForm onFileNamed: 'sulphur.gif'.
See also
aMorph asEPS