I am trying to add a caption - the file name - under the bottom edge of a jpg.

I have the following Python code:

```
    import Image, ImageDraw, ImageFont, os, glob

list = glob.glob('*.jpg')

for infile in list:
    print infile
    file, ext = os.path.splitext(infile)
    outname = file + "_test.jpg"
    print outname
    im = Image.open(infile)
    d = ImageDraw.Draw(im)
    f = ImageFont.truetype("Arial.ttf", 16)
    d.text((4,0), file, font=f)
    im.save(outname)

```

It prints out the name of the file, so the file is there - so why can't it open it?

The file exists, but I get the following error:
![enter image description here](https://i.stack.imgur.com/oPVa3.jpg)

Is there an easier way to add a caption to the bottom of the image?