<div dir="ltr">Thanks. This is what I was looking for. So , after changing the pixel [0,0], how do we save the modified image?<br><br><div class="gmail_quote">On Tue, Aug 12, 2008 at 3:03 AM, Fredrik Lundh <span dir="ltr">&lt;<a href="mailto:fredrik@pythonware.com">fredrik@pythonware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Talat Fakhri wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am a newbie here. I would like to know if there is any function which converts Images to Matrix(RGB or greyscale etc) and another function which converts the matrix into Image file?<br>
</blockquote>
<br></div>
&quot;matrix&quot; as in?<br>
<br>
If you just want to work with the image data as Python sequence, use getdata/putdata, or pixel access objects:<br>
<br>
 &nbsp; &gt;&gt;&gt; im = Image.open(&quot;image.jpg&quot;)<br>
 &nbsp; &gt;&gt;&gt; pix = im.load()<br>
 &nbsp; &gt;&gt;&gt; pix[0, 0]<br>
 &nbsp; (226, 162, 125)<br>
 &nbsp; &gt;&gt;&gt; pix[0, 0] = (0, 0, 0)<br>
<br>
&lt;/F&gt;<br>
<br>
_______________________________________________<br>
Image-SIG maillist &nbsp;- &nbsp;<a href="mailto:Image-SIG@python.org" target="_blank">Image-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/image-sig" target="_blank">http://mail.python.org/mailman/listinfo/image-sig</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Talat,<br>Chief Executive Officer.<br>&quot;Breathing Life Into Concepts.&quot;<br> AT<br> Evolvimatix.<br><br>
</div>