Create own Morph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Create own Morph

SonGuko
Hi,
I'm searching for a possiblity to create my own morphs. When i draw something in paint, I cant export it to a bitmap array or something. I want to share the project with the other people via monticello, so i cant just put drag the picture in squeak and bind it to a global dictionairy...

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Create own Morph

SonGuko
hey,
so i answer myself for others:

step 1: drag your image in squeak
step 2: explore the created morph
step 3: go to the bitmap part of the morph and highlight it
step 4: print: self compressToByteArray
step 5: to create a new morph with the picture: ColorForm extent: (insert your imagesize) depth: (insert your depth of the image) bits: (Bitmap decompressFromByteArray:   #(insert your compressedToByteArray)) asMorph
step 6: profit :)