Skip to content

Use default palettes for indexed BMPs#574

Merged
treeform merged 1 commit intomasterfrom
fix/bmp-default-indexed-palette
Apr 30, 2026
Merged

Use default palettes for indexed BMPs#574
treeform merged 1 commit intomasterfrom
fix/bmp-default-indexed-palette

Conversation

@treeform
Copy link
Copy Markdown
Owner

Fixes #561.

Summary:

  • Treat clrUsed == 0 as the default palette size for 1-bit, 4-bit, and 8-bit indexed BMPs.
  • Add synthetic 1-bit and 4-bit BMP regression cases that decode a white pixel from default-sized palettes.

Tests:

  • nim r --hints:off --warnings:off tests\test_bmp.nim
  • git diff --check

@treeform treeform merged commit 2cf901d into master Apr 30, 2026
3 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.

Valid 1-bit and 4-bit indexed BMPs with clrUsed at 0 crash with IndexDefect

1 participant