Re: [Image-SIG] Image to Matrix to Image.

2009-03-05 Thread Fredrik Lundh
2009/3/4 Jeff Hull : > I am having the same problem. I can not save this image after i edit its > data. > > im = myimage.load() > > ...do stuff to im... > > im.save('jeff', "JPEG") make that myimage.save(...) the object that's returned from load is a reference to the contents of the image, n

Re: [Image-SIG] Image to Matrix to Image.

2009-03-05 Thread Jeff Hull
I am having the same problem. I can not save this image after i edit its data. im = myimage.load() ...do stuff to im... im.save('jeff', "JPEG") Traceback (most recent call last): File "numberfinder.py", line 116, in main() File "numberfinder.py", line 97, in main imL = applyMask(i

Re: [Image-SIG] Image to Matrix to Image.

2008-08-13 Thread Fredrik Lundh
Talat Fakhri wrote: Thanks. This is what I was looking for. So , after changing the pixel [0,0], how do we save the modified image? the same way as you'd save any PIL image: http://effbot.org/tag/PIL.Image.Image.save you have read the tutorial, right? http://effbot.org/imagingbook/intro

Re: [Image-SIG] Image to Matrix to Image.

2008-08-13 Thread Talat Fakhri
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 <[EMAIL PROTECTED]>wrote: > Talat Fakhri wrote: > > I am a newbie here. I would like to know if there is any function which >> converts I

Re: [Image-SIG] Image to Matrix to Image.

2008-08-11 Thread Christopher Barker
Fredrik Lundh wrote: "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) or convert to numpy

Re: [Image-SIG] Image to Matrix to Image.

2008-08-11 Thread Fredrik Lundh
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 ge

[Image-SIG] Image to Matrix to Image.

2008-08-11 Thread Talat Fakhri
Hi, 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? Thanks. PS: I have dug in mail archives and PIL, but could not conclusively find the solution. _