untested load_from_image function