Repository navigation
Support greyscale TIFFs with ExtraSamples 0 or 1 - #10140
Conversation
|
A note on ExtraSamples 0 (unspecified): I mapped it to Thanks to @street1983nk for the sample files in #10139. They are small (324 bytes LZW, about 6 kB raw), so if you'd like them as fixtures I'm happy to add them to |
Sounds like it would be ok to me. I've created officialpm#1 with this change. |
Read L with unspecified extra samples as L
|
Thanks @radarhere, merged your follow-up into the branch. I rebuilt with libtiff enabled and checked all four reporter files: ExtraSamples 0 opens as L, and ExtraSamples 1 remains La. ExtraSamples 2 still opens as LA. Tests/test_file_tiff.py passes (87 passed, 2 skipped). |
Fixes #10139
Lusing the newLXraw mode, which skips the unspecified sample rather than treating it as alpha. ExtraSamples 1 opens asLa; value 2 remainsLA.Tested with a source build using libtiff 4.3.0:
python -m pytest Tests/test_file_tiff.py -q(87 passed, 2 skipped). Also checked the reporter's four raw/LZW TIFFs and the modes for ExtraSamples 0, 1 and 2. Ruff is clean.