Re: 16bit RGB with Image module

2007-03-27 Thread Will McGugan
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, "ra

Re: 16bit RGB with Image module

2007-03-27 Thread Jason B
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

16bit RGB with Image module

2007-03-27 Thread Jason B
Hi all, I'm still new to all of this, but I'm trying to do something here that *seems* like it should be pretty simple. All I want to do is take an array of pixel data from a file (no header data or anything, just pixel data) in RGB565 format and save it off to a bitmap file - or display it, i