def load_image ( fname ) : with open ( fname , "rb" ) as f : i = Image . open ( fname ) #i.load() return i
open image from image path in python
read an image from file - PIL doesnt close nicely
def load_image(fname):
    """ read an image from file - PIL doesnt close nicely """
    with open(fname, "rb") as f:
        i = Image.open(fname)
        #i.load()
        return i