mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 19:22:32 +00:00
format exif string
* UserComment needs an ID code at the start of the tag area. This is provided by piexif.helper.UserComment, otherwise an "Warning Invalid EXIF text encoding for UserComment" is thrown upon reading the exif data
This commit is contained in:
@@ -325,8 +325,8 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
|
||||
if extension.lower() in ("jpg", "jpeg", "webp"):
|
||||
exif_bytes = piexif.dump({
|
||||
"Exif": {
|
||||
piexif.ExifIFD.UserComment: info.encode("utf8"),
|
||||
}
|
||||
piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(info)
|
||||
},
|
||||
})
|
||||
else:
|
||||
exif_bytes = None
|
||||
|
Reference in New Issue
Block a user