LPX55's picture
refactor: update import paths for forensics utilities and enhance logging functionality in inference data
bc355a9
raw
history blame
380 Bytes
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