Repository navigation
Added tags when saving YCbCr TIFF - #5597
Conversation
| if im.mode == "YCbCr" and not libtiff: | ||
| for tag, value in { | ||
| YCBCRSUBSAMPLING: (1, 1), | ||
| REFERENCEBLACKWHITE: [15, 235, 128, 240, 128, 240], |
There was a problem hiding this comment.
I think this should probably be by default the full range [0, 255, 128, 255, 128, 255], as that is what JPEG uses?
There was a problem hiding this comment.
I got the numbers the "CCIR Recommendation 601.1 headroom/footroom" from http://www.verypdf.com/document/tiff6/txtidx0009.htm
You think that the "no headroom/footroom" option is better though?
There was a problem hiding this comment.
Yes, 601 is for video really, while JPEG uses full range. See also #4668
There was a problem hiding this comment.
So there is of course the (valid?) assumption that we're almost always dealing w/ full range image data that's not new here: either reading full range YCbCr from JPEG using draft() or doing the default full range RGB->YCbCr conversion.
There was a problem hiding this comment.
Thanks. I've updated the commit
0e03296 to
8d1e269
Compare
Resolves #5589
Ensures that tags 530 and 532 are present when saving a YCbCr TIFF.