0

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.

Salahuddin Ahmed
  • 4,854
  • 4
  • 14
  • 35
  • I suspect it truly actually is jpeg data inside a file incorrectly named `.png`. I don't know how you "checked" it, but most software will probably just display the jpeg image despite the file extension. – Mikael Öhman Jun 23 '21 at 00:40
  • If you want help, you'll have to find a way to post `sampleImage.png` for us to look at. – Mark Ransom Jun 24 '21 at 00:53

0 Answers0