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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.