<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"><<a href="mailto:fredrik@pythonware.com">fredrik@pythonware.com</a>></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>
"matrix" 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>
>>> im = Image.open("image.jpg")<br>
>>> pix = im.load()<br>
>>> pix[0, 0]<br>
(226, 162, 125)<br>
>>> pix[0, 0] = (0, 0, 0)<br>
<br>
</F><br>
<br>
_______________________________________________<br>
Image-SIG maillist - <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>"Breathing Life Into Concepts."<br> AT<br> Evolvimatix.<br><br>
</div>