from PIL import Imagefrom pillow_heif import register_heif_openerregister_heif_opener()
Image.open("xxx")