0 votes
in Python Imaging Library by
How to Open TIFF image in PIL (Python)?

1 Answer

0 votes
by
The problem is that PIL wants to see a ".tiff" at the end of the file name. You have ".tif". The solution is to rename your file to "LakeEx.tiff".

from PIL import Image

import numpy

im = Image.open('LakeEx.tiff')

imarray = numpy.array(im)

imarray.shape

im.show()

Related questions

0 votes
asked Oct 2, 2023 in Python Imaging Library by sharadyadav1986
0 votes
asked Oct 2, 2023 in Python Imaging Library by sharadyadav1986
...