I am trying to open an image using open method of Image of PIL, but am getting the following error.
I have stored my image at C:\a.jpg.
>>> h1 = Image.open("C:\a.jpg").histogram()
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
h1 = Image.open("C:\a.jpg").histogram()
File "C:\Python27\lib\site-packages\PIL\Image.py", line 1952, in open
fp = __builtin__.open(fp, "rb")
IOError: [Errno 22] invalid mode ('rb') or filename: 'C:\x07.jpg'
Try escaping the back slashes…