[Image-SIG] Image to Matrix to Image.

Talat Fakhri fakhriworld at gmail.com
Tue Aug 12 11:43:58 CEST 2008


Thanks. This is what I was looking for. So , after changing the pixel [0,0],
how do we save the modified image?

On Tue, Aug 12, 2008 at 3:03 AM, Fredrik Lundh <fredrik at pythonware.com>wrote:

> Talat Fakhri wrote:
>
>  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?
>>
>
> "matrix" as in?
>
> If you just want to work with the image data as Python sequence, use
> getdata/putdata, or pixel access objects:
>
>   >>> im = Image.open("image.jpg")
>   >>> pix = im.load()
>   >>> pix[0, 0]
>   (226, 162, 125)
>   >>> pix[0, 0] = (0, 0, 0)
>
> </F>
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>



-- 
Talat,
Chief Executive Officer.
"Breathing Life Into Concepts."
AT
Evolvimatix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20080812/2cbb3cbf/attachment.htm>


More information about the Image-SIG mailing list