Fix invert_colors to support extended bit depths (9-15 promoted to u16, 17-31 promoted to u32). Byte-wise NOT doesn't work for promoted samples because it flips unused upper bits; use (max - value) instead. Add regression tests covering the extended depth matrix: - Gray 10/14/24-bit (contiguous, BlackIsZero) - RGB 10/14/24-bit (contiguous) - RGB 10/12/14/24-bit (planar) - Gray 12-bit with WhiteIsZero (synthetic 4x2 image) - Gray 12-bit with horizontal predictor (synthetic 4x2 image)
146 B
146 B