import tempfile import exiftool from PIL import Image def exif_full_dump(image: Image.Image) -> dict: """Extract all EXIF metadata from an image using exiftool.""" with tempfile.NamedTemporaryFile(suffix='.jpg', delete=True) as tmp: image.save(tmp.name) with exiftool.ExifTool() as et: metadata = et.get_metadata(tmp.name) return metadata