updated get_image_size