Skip to content

Allow lenient validation in BMP decoder#2764

Merged
197g merged 6 commits intoimage-rs:mainfrom
telecos:feature/lenient-validation
Feb 12, 2026
Merged

Allow lenient validation in BMP decoder#2764
197g merged 6 commits intoimage-rs:mainfrom
telecos:feature/lenient-validation

Conversation

@telecos
Copy link
Contributor

@telecos telecos commented Feb 10, 2026

Chromium decoder accept certain files which are not valid per strict BMP spec. This change is introduce a lenient mode to allow these files only when lenient mode is enabled, while Strict mode is still default mode.

This change should implement discrepancies 3, 4, 5 and 6 from #2747

@telecos telecos force-pushed the feature/lenient-validation branch from a276d79 to 3c9d4a2 Compare February 10, 2026 16:22
@telecos telecos marked this pull request as ready for review February 10, 2026 16:26
@telecos telecos force-pushed the feature/lenient-validation branch from 186dff8 to 78eb4cd Compare February 12, 2026 09:51
@telecos telecos requested review from 197g and anforowicz February 12, 2026 10:20
Copy link
Member

@197g 197g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good approach of having lenient separately to really test the mode while preserving existing bad_bmp test. LGTM.

@197g 197g merged commit 49acf15 into image-rs:main Feb 12, 2026
32 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.

3 participants