On Sat, Oct 4, 2008 at 8:51 PM, Brad Montgomery <[EMAIL PROTECTED]>wrote:
> Would something like PIL's putalpha do what you want? (provided you *have* > PIL) > Yes, I have PIL. > http://www.pythonware.com/library/pil/handbook/image.htm (search for > putalpha) > > import Image > my_image = Image.open('somefile.jpg') > my_image.put_alpha(0) > my_image.save('somefile.png') > > This would convert all the black (int val for black = 0) in your image > to alpha's, but then you'd have to save to something that supports an > alpha channel. > > -- > brad [bradmontgomery.net] > Well, I want to set the alpha value for every pixel. So, every pixel, regardless of its color should be 50% transparent. The code I posted does that, but it doesn't save that alpha data to the file. Ian
