Image.new() bug on Solaris???

Kevin Cazabon kcazabon at home.com
Sun Mar 26 22:39:49 EST 2000


have you tried (1) instead of 0xff?  creating a new mode '1' image on
Windows with (1) as the color creates a white image...

x = Image.new("1", (100,100), (1))

???

Kevin.

"Thomas & Jennifer Thompson" <tmt1630 at cs.rit.edu> wrote in message
news:38DEA465.D43CEFC9 at cs.rit.edu...
> Hello,
>
> I'm having trouble with creating black/white bitmaps
> with Python and PIL.  I'm using Python v1.5.2,
> PIL v1.0, and Solaris 5.7.  When I run the following
> code, I end up with an all-black picture (which
> I would expect to be all-white).
>
> **********************
> import Image
> x=Image.new("1", (50,50), 0xff)
> x.save('test.bmp')
> ***********************
>
> A while ago, FL suggested trying -1 in place
> of 0xff, but that didn't change anything.
>
> Can someone out there with the same versions
> of Python, PIL and Solaris try this code for
> me?  I'm interested to see what results you get.
>
> Thanks!
>
> Tom
>





More information about the Python-list mailing list