Reputation: 245
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.
Upvotes: 1
Views: 4497
Reputation: 69
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
Upvotes: 1