PIL's Image.open doesn't load the image data until it needs to, as seen in the docs,
This is a lazy operation; this function identifies the file, but the
file remains open and the actual image data is not read from the file
until you try to process the data (or call the load() method). See
new().
To check this in ipython I ran
im = Image.open(filename)
im.size
on a 22MB image, ps -av reported:
33714 17772 0.8 /usr/bin/python2 /usr/bin/ipython2
34506 18220 0.8 /usr/bin/python2 /usr/bin/ipython2
34506 18220 0.8 /usr/bin/python2 /usr/bin/ipython2
for memory usage, before open, before size and after size, confirming that the 22MB image hasn't been loaded into memory (ipython started out using 32538 17252).
That figure then jumps up to ~57k following im.load().