I have a binary black and white image as a .tif
file. I do this
image = imageio.imread(path)
print ' Min and max ', image.min(), image.max(), image.shape, type(image[0,0])
imageio.imsave(path, image)
Which prints
Min and max 0 255 (1024, 1024) <type 'numpy.uint8'>
However, after I run that, black and white colors have reversed. What is going on?
When I try this command
identify -verbose 6hr-001-DIC.tif
on the pre-processed image, I see
tiff:photometric: min-is-white
But after I run the python code, it shows tiff:photometric: min-is-black
So how can I address this, i.e. make sure it's not getting changed?