Skip to content

fix: use 16-bit midpoint for monochrome CopyBits - #570

Merged
benletchford merged 1 commit into
masterfrom
dev/fix-monochrome-copybits
Aug 17, 2026
Merged

fix: use 16-bit midpoint for monochrome CopyBits#570
benletchford merged 1 commit into
masterfrom
dev/fix-monochrome-copybits

Conversation

@benletchford

Copy link
Copy Markdown
Owner

Fixes #569.

The 8-bit indexed-to-1-bit CopyBits path now compares RGB luminance against the midpoint of Macintosh RGBColor’s 16-bit component range. Regression coverage exercises black, white, and values immediately below and at the midpoint.

Validation:

  • cargo fmt --check
  • CARGO_INCREMENTAL=0 cargo test --lib (2950 passed, 3 ignored)

@benletchford
benletchford marked this pull request as ready for review August 13, 2026 18:07
@benletchford
benletchford merged commit 4558b0c into master Aug 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8-bit to monochrome CopyBits misclassifies most colors

1 participant