[BangPypers] Convert to Black and White to an image
kunal.t2 at gmail.com
Fri Jan 7 17:57:36 CET 2011
On 01/07/2011 10:04 PM, Narendra Sisodiya wrote:
> Can somebody give an easy way to convert a image into black and white using
> a given threshold..
> Currently I am doing like this
> for i in range(0,width):
> for j in range(0,height):
> if image.getpixel((i,j))<= 200:
another way to grayscale an image is:
from PIL import Image
a = Image.open("image_0065.jpg")#color image
b is a grayscale image now ;)
> What is the general mailing list to ask question on python ?
The Image SIG mailing list would be a more appropriate place
image-sig at python.org
Dept of Computer Sc.& Engineering.
More information about the BangPypers