Re: [Newbies] [Q] Creating Form from ByteArray

2014-06-11 Thread Bert Freudenberg
On 11.06.2014, at 00:36, Sungjin Chun wrote: > Hi, > > I want to draw gray scale bitmap using byte array which has pixel by pixel > gray > scale value as byte like this; > > [0 0 0 0 0 0 0 0 > 16 23 255 78 12 12 12 12 > ... > ...] (8x4 for example) > > I can draw this using Pen class pixel b

Re: [Newbies] [Q] Creating Form from ByteArray

2014-06-11 Thread karl ramberg
Form has some class side methods to create Forms from arrays, too. Cheers, Karl On Wed, Jun 11, 2014 at 12:41 PM, Bert Freudenberg wrote: > On 11.06.2014, at 00:36, Sungjin Chun wrote: > > > Hi, > > > > I want to draw gray scale bitmap using byte array which has pixel by > pixel gray > > sca

Re: [Newbies] [Q] Creating Form from ByteArray

2014-06-11 Thread Sungjin Chun
Thanks you for your answer, however there is something I missed here. I've tried following code | w h bytes form | w := 200. h := 200. bytes := ((1 to: w*h) collect: [:i | 255 ]) asByteArray. (1 to: w) do: [ :x | (1 to: h) do: [ :y | x = y ifTrue: [ bytes at: (w*(y - 1) + x) put: 0 ]