So when I try to use imread on a TIFF-file, it raises this error.
The TIFF-file in question is a TIFF I created and modified in another script. I initially created it like this: temp = np.full([max_y, max_x], np.nan)
. Then I looped the cells and changed the cell values. Afterwards I used cv2.imwrite to write it to a file.
However the original script where I create and modify the TIFF-file also opens it after writing the file so no clue why it opens then, and not in this new script. The only change I've made since then is copying the file.
I can also open the file in QGIS so no clue what the problem is.
EDIT: this is the picture https://drive.google.com/file/d/1CjAGegeA9RUmTtgd_8xgrRPqOLx8NdMa/view?usp=sharing
The relevant part of the code you can find here: https://codeshare.io/5oYNDo. The error occurs in line 32.
EDIT 2: With the help of Mark I've got it transformed to a 32-bit image: https://drive.google.com/file/d/1xDyqeEzMrB-84ms9BB7YztbT-_kfJpeG/view?usp=sharing. However plt.imread still didn't work. So now I am using img_arr = np.asarray(Image.open(img))
. However this results in a strange bug: the array is full of NaN's but when I hover over a picture I do get the cell value. (https://i.stack.imgur.com/oWrBt.jpg) Because of the array full of NaN's vmin and vmax are not working properly, that's why the whole picture is yellow. If I remove the vmin and vmax it's visualized as it should. But the array full of NaN's will result in problems further in the script so this has to be solved first.