[Image-SIG] PIL and simple conversion
Fredrik Lundh
fredrik at pythonware.com
Thu Dec 4 18:49:21 CET 2008
On Mon, Dec 1, 2008 at 7:08 PM, Scott David Daniels
<Scott.Daniels at acm.org> wrote:
> Almost a FAQ:
>
> import cStringIO
> import Image
>
> im = Image.open("xyzzy.png")
> ...
> holder = cStringIO.StringIO()
> im.save(holder, format="png", transparency=0)
> bytes_string = holder.getvalue()
I was about to point out that it's actually mentioned in the latest
version of the docs, but then I discovered that it's mentioned under
"tostring" but not under "save". Looks like I have some editing to
do...
</F>
More information about the Image-SIG
mailing list