mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 10:37:11 -06:00
A WhiteIsZero (PhotometricInterpretation 0) gray TIFF opened as a negative at every bit depth. The `tiff` crate (0.11) already inverts those samples as it reads them, for every layout it accepts, and refuses the WhiteIsZero layouts it can't invert; the decoder here then inverted them a second time. WhiteIsZero is common in scanner and fax output, and CCITT fax images use it by definition. The second inversion is removed. The new test builds 8- and 16-bit WhiteIsZero and BlackIsZero strips in code and fails without the fix (the lowest sample came out black instead of white). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>