Pyhon and PIL

Fredrik Lundh fredrik at pythonware.com
Mon Mar 11 11:44:38 EST 2002


François Pinard wrote:
> Maybe this would work?
>
>     import Image
>     Image.open('yellow.bmp').convert('L').point(255*[0] + [255]) \
>         .convert('1').save('yellow.bmp')

footnote: in this specific case, you can point & convert in
one operation.  or in other words,

    point(255*[0] + [255]).convert('1')

can be written as:

    point(255*[0] + [255], '1')

</F>





More information about the Python-list mailing list