1
import Image


imageFile = "C:\Users\Abhi\Desktop\cbir-p\images.jpg"
im1 = Image.open(imageFile)



Error: 
File "C:\Users\Abhi\Desktop\cbir-p\im1.py", line 5, in <module>
    im1 = Image.open(imageFile)
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 2025, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

help me, I have installed all the necessary packages PIL ,Pillow ,Opencv etc.

user3320033
  • 245
  • 3
  • 6
  • 16

1 Answers1

1

hey it's not for your file path problem...

it's for your missing JPEG support in your PIL here is my solution explained here. https://apple.stackexchange.com/questions/59718/python-imaging-library-pil-decoder-jpeg-not-available-how-to-fix

Go to here to download the lib libjpeg package. or just

brew install libjpeg

enter image description here

Community
  • 1
  • 1
nancy_yeah
  • 69
  • 6