Hello everyone,<br>
<br>
I'm doing image processing on 8-bit gray color images.<br>
This code loads the data into array:<br>
<br>
&nbsp;&nbsp;&nbsp; <a href="http://self.im">self.im</a>&nbsp;&nbsp;&nbsp;&nbsp; = Image.open(&quot;example.bmp&quot;)<br>
&nbsp;&nbsp;&nbsp; self.image&nbsp; = zeros([self.im.size[0], self.im.size[1]], Int)<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; i = 0<br>
&nbsp;&nbsp;&nbsp; while(i &lt; self.im.size[0]):&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; j = 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(j &lt;
self.im.size[1]):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.image[i,j] = self.im.getpixel((i, j))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; j=j+1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i=i+1<br>
<br>
Is there a faster way to do it? For example using getdata() method of Image class?<br>
And later how I can convert above array into Image without using slow putpixel method?<br>
<br>
Marcin<br>