'Return a new |Image| subclass instance loaded from the image file
identified by *image_descriptor*, a path or file-like object.'

@classmethod
def from_file(cls, image_descriptor):

    if is_string(image_descriptor):
        path = image_descriptor
        with open(path, 'rb') as f:
            blob = f.read()
            stream = BytesIO(blob)
        filename = os.path.basename(path)
    else:
        stream = image_descriptor
        stream.seek(0)
        blob = stream.read()
        filename = None
    return cls._from_stream(stream, blob, filename)
