It returns the path to the image, so I think that's probably the safest way to return the object.  That tempfile will be a png file.