Imghdr module in Python 3.9.5 misidentifying .png file

125 Views Asked by At

When I call imghdr.what(sampleImage.png) it recognizes it as a jpeg for some reason. For example if I use print(imghdr.what(sampleImage.png)) it will output the string "jpeg". I checked the image file and it is displayed as having the expected PNG file format on Mac OSX.

0

There are 0 best solutions below