My bad. I was hacking the code trying to support RGBA mode images, and inadvertently i tried im.tostring("raw","BGRX") on the RGBA mode image.
So BGRX does indeed work for RGB mode images. While trying to support RGBA mode images, i realized that a BGRA raw mode is needed for working with QImage. It doesn't seem to be supported by PIL. Any workarounds? Regards Sreeram Fredrik Lundh wrote: > $ python > >>> import Image > >>> im = Image.new("RGB", (100, 100)) > >>> print len(im.tostring("raw", "BGRX")) > 40000
signature.asc
Description: OpenPGP digital signature
-- http://mail.python.org/mailman/listinfo/python-list