I made a utility that works with some scanned images. Everything was working until I started scanning grayscale images.
It seems that the only issue is that the images cannot be displayed in the gui if they are 16bit, but it looks like the manipulations work fine. So as a fix I wanted to convert the image that is displayed in the gui to 8 bit, but I have not been successful with this. Any ideas?
#! /usr/bin/env python
filename = sys.argv
im = Image.open(filename)
im2 = im.convert('L') # this doesn't do what I was wanting
Edit: Attached is an example image
python imgtest.py grayscale_example.png
Edit2: realized convert creates a new object instead of replacing existing, but it still doesn't convert the pixel data to be visible. The displayed image is solid white.