We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I saved 2 copies of a webp file, one with exif=exif_bytes as shown, one without, then added the exif data by piexif.insert
exif data to be the same
winmerge binary comparison reveals "Exif" is quoted one extra time in the Pillow image.save version indicating a coding error
from PIL import Image import piexif import piexif.helper info = "test data in User Comment" fullfn = "sample_image.webp" exif_bytes = piexif.dump({ "Exif": { piexif.ExifIFD.UserComment: piexif.helper.UserComment.dump(info, encoding="unicode") }, }) with Image.open(fullfn) as image: image.save(fullfn, quality=60, exif=exif_bytes) image.save("sample_image_inserted_exif.webp", "webp", quality=60) piexif.insert(exif_bytes, "sample_image_inserted_exif.webp")
The text was updated successfully, but these errors were encountered:
I don't think this is an "error". Looking through our test images, flower.webp has the b"Exif\x00\x00" prefix, and flower2.webp does not.
b"Exif\x00\x00"
I've created PR #6582 to resolve this, by removing the prefix when saving for the sake of smaller files.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What did you do?
I saved 2 copies of a webp file, one with exif=exif_bytes as shown, one without, then added the exif data by piexif.insert
What did you expect to happen?
exif data to be the same
What actually happened?
winmerge binary comparison reveals "Exif" is quoted one extra time in the Pillow image.save version indicating a coding error
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: