added get_image_data() and close()