[Newbies] Bitmap loading from array - representation

Jerome Peace peace_the_dreamer at yahoo.com
Fri Dec 7 02:45:00 UTC 2007


[Newbies] Bitmap loading from array - representation


Hi Pete,

The way to a bitmap definition is easier. This is
squeak.
You get the picture of what you want. (Draw, paint or
photograph and scan).

Get it into squeak.

Then you ask the forms bitmap to print itself as an
array.
Or Maybe even the form can print itself out. 

If you don't quite get what you need edit it into a
definition and save/accept the definition as a message
to some object. And your done.

E.g.
David Röthlisberger suggestion:
http://mail.wiresong.ca/pipermail/ob-dev/2007-December/000259.html
     | image stream |
     image := ColorForm fromFileNamed:
'/path/to/picture/icon.gif'.
     stream := WriteStream with: String new.
     image storeOn: stream.
     stream contents.

If you get your image in another way just modify the
above code to accomodate. Note with a little extra
effort you could alter the above code to write an
initalization routine.

It takes a while to think in squeak. The trick is
realizing how easy it can be to do what you want.

Hth,

Yours in service and curiosity, --Jerome Peace




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



More information about the Beginners mailing list