Fix for UnicodeDecodeError: ascii codec cannot decode byte while saving a TIFF image#1309
Fix for UnicodeDecodeError: ascii codec cannot decode byte while saving a TIFF image#1309bogdan199 wants to merge 2 commits intopython-pillow:masterfrom
Conversation
…ng a TIFF image Problem occured while saving TIFF images that contain non-ascii characters in metadata
|
IIRC from the tiff spec, the metadata needs to be ascii values < 127. Arguably, erroring is the right thing, esp if we have an explanation handy so that the user can do reasonable substitutions, rather than just dropping the character. |
|
@wiredfool you're right, usually approach of 'explicitly signaled failure' is the right behaviour, except the case of batch processing when you have a lot of (not even dozens but thousands and more) TIFF images with broken metadata encoding. Fix submitted by @bogdan199 makes hard failures recoverable, I like it! |
Resolved conflict in PIL/TiffImagePlugin.py
|
I've just resolved all conflicts. |
There was a problem hiding this comment.
"excersized" isn't a word in US or UK English.
There was a problem hiding this comment.
Looks like the conflict was resolved the wrong way, reversing the effect of PR #1311
|
See #1416 |

Problem occured while saving TIFF images that contain non-ascii characters in metadata.
Solves issue #272