[Image-SIG] Simple Question, avoid Image.save

Elias Fotinis efotinis at gmail.com
Fri Jan 6 07:48:00 CET 2012


On Thu, 29 Dec 2011 14:31:05 +0200, <auto11436877 at hushmail.com> wrote:

> Hi, I wanted to get the actual bmp data without writting the content
> to disk.
> Example:im = Image.new("RGB", (16, 16) )im.save('image.bmp')
> I want to avoid im.save, and just get the actual BMP file data for
> further processing.

Use im.tostring() to get the data as a string, or im.getdata() to get a sequence of (R,G,B) tuples.


More information about the Image-SIG mailing list