[Tutor] problem in converting pixel data to image file

Kent Johnson kent37 at tds.net
Mon Aug 18 12:29:35 CEST 2008


On 8/18/08, Ashish Sethi <ashishbitsgoa at gmail.com> wrote:
> Hi all,
> I have a problem in converting the pixel data (read from a string and
> written to a file using fromstring command in PIL ).
> The file handle of this file is called buffer. Now, when I tried to open the
> file as an image file but it didnt work.

I'm confused. Why don't you use Image.save() to write the image and
Image.open() to read it?

Kent


More information about the Tutor mailing list