Convert to Black and White to an image
Narendra Sisodiya <[email protected]>
| Newsgroups | gmane.comp.python.image |
|---|---|
| Message-ID | <[email protected]> |
Can somebody give an easy way to convert a image into black and white using
a given threshold..
Currently I am doing like this
image=ImageOps.grayscale(image)
for i in range(0,width):
for j in range(0,height):
if image.getpixel((i,j)) <= 200:
image.putpixel((i,j),0)
_______________________________________________
Image-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/image-sig