Hello to all,
I am working on a program that determines the average size of a yeast colony in a photograph, and it works great with .bmp images that I tested them on. The program uses pygame and can use PIL later.
However, the camera / software combination that we use in my laboratory will only save 16-bit shades of gray, and pygame does not seem to be able to recognize the 16-bit tiff, only 8 bits. I read the last few hours along simple paths around this, but even the Python Imaging Library does not seem to work with the 16-bit .tiff, I tried, and I get "IOError: cannot detect image file".
import Image img = Image.open("01 WT mm.tif")
My ultimate goal is to make this program convenient and easy to install, so I try not to add additional modules or require people to install ImageMagick or something like that.
Does anyone know a simple workaround for this problem with free or pure python? I donβt know too much about images: manipulating depth to depth is not suitable. But I'm sure I don't need all 16 bits, and probably only about 8 really have real data. In fact, I once used ImageMagick to try to convert them, and this resulted in an all-white image: since then I read that I have to use the "-auto-levels" command because the data does not actually cover 16-bit.
I really appreciate your help and apologize for the lack of knowledge.
PS: Does anyone have any tips on how to make my Python program easy for non-programmers to install? Is there a way, for example, to somehow associate it with Python and pygame, so that is only one installation? Can this be done for both Windows and Mac? Thanks.
EDIT: I tried opening it in GIMP and got 3 errors:
1) Wrong counter for the "DateTime" field (27, expect 20); cropped tag 2) Sorry, cannot process images with 12-bit samples 3) Unsupported layout, no RGBA downloader
What does it mean and how do I fit it?