File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -740,6 +740,12 @@ impl Image {
740740 if matches ! ( color, ColorType :: YCbCr ( _) ) && self . chroma_subsampling != ( 1 , 1 ) {
741741 // The JPEG library does upsampling for us and defines its buffers correctly
742742 // (presumably). All other compression schemes are not supported..
743+ //
744+ // NOTE: as explained in <fa225e820b96bef35f01bf4685654beeb4a8df0c> we may be better
745+ // off supporting this tag by consistently upsampling, not by adjusting the buffer
746+ // size. At least as a default this makes more sense and is much more permissive in
747+ // case the compression stream disagrees with the tags (we would not have enough / or
748+ // the wrong buffer layout if we only asked for subsampled planes in a planar layout).
743749 if !matches ! ( self . compression_method, CompressionMethod :: ModernJPEG ) {
744750 return Err ( TiffError :: UnsupportedError (
745751 TiffUnsupportedError :: ChromaSubsampling ,
You can’t perform that action at this time.
0 commit comments