The PIL manual says that calling image.convert('1') on a greyscale
image will threshold the image (fairly starkly: "all non-zero values
are set to 255 (white).")  However, when I try this on a test page of
color blocks, I seem to get Floyd-Steinberg dithering instead.

The code sequence I use is:


        import Image, ImageOps

        im = Image.open(infilename)
        if im.mode == 'RGB':
            im = ImageOps.grayscale(im)
        if im.mode == 'L':
            im = ImageOps.autocontrast(im)
            im = im.convert('1')
        im.save(outfilename, 'TIFF')

Is the documentation out of date?

If I want thresholding, is there a now a way to do it without using
"point"?  Using quantize(), perhaps?

Is there a difference between Image.convert('L') and
ImageOps.grayscale()?

Bill
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to