Jason B wrote: > Well I kept screwing around and funny thing, this works: > > import sys, Image > > if len(sys.argv) == 2: > print "\nReading: "+sys.argv[1] > image_file = open(sys.argv[1], "rb") > pixel_data = image_file.read() > > im = Image.fromstring("RGB", (326, 325), pixel_data, "raw", "BGR;16") > im.show() > > Although I have no idea *why* it works, other than the fact that I'm now > using the correct number of bits per pixel. :) > > Anyone have thoughts on this?
Well RGB will will use 24 bits per pixel, not 16, so the first error you got makes sense. I guess using the raw decoder with "BGR;16" makes it use 16 bit. Although, I couldn't find any reference in the docs! I'm sure Fredrik Lundh could shed some light on this... Will McGugan -- blog: http://www.willmcgugan.com -- http://mail.python.org/mailman/listinfo/python-list