I am trying to run a simple python program that loads an image:
import Image
import os.path
script_dir = os.path.dirname(os.path.abspath('__file__'))
im = Image.open(os.path.join(script_dir, 'test.jpg'))
img.show()
I keep getting the following error message:
Traceback (most recent call last):
File "/home/pi/projects/testimage.py", line 5, in <module>
im = Image.open(os.path.join(script_dir, 'test.jpg'))
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1952, in open
fp = __builtin__.open(fp, "rb")
IOError: [Errno 2] No such file or directory: '/home/pi/projects/test.jpg'
I have the jpg saved in that directory but nothing seem to work.