mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 23:37:00 +08:00
This is the way to generate the type 2 exif tag 37510 that you want to import json from a webp/jpeg:
```
exif = img.getexif()
dump = json.dumps(metadata)
exif[ExifTags.Base.UserComment] = json.dumps(metadata)
exif_dat = exif.tobytes()
img.save(image_path, exif=exif_dat)
```
In doing so, you cannot import the unicode json embedded the way pnginfo reads the webp. pnginfo.js also will be modified.