Create own Morph

classic Classic list List threaded Threaded
2 messages Options
SonGuko SonGuko
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Create own Morph

This post has NOT been accepted by the mailing list yet.
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
SonGuko SonGuko
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Create own Morph

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 :)

Loading...