Skip to content

Define SpecCompliance enum for controlling spec strictness#2767

Open
telecos wants to merge 1 commit intoimage-rs:mainfrom
telecos:feature/spec-compliance-api
Open

Define SpecCompliance enum for controlling spec strictness#2767
telecos wants to merge 1 commit intoimage-rs:mainfrom
telecos:feature/spec-compliance-api

Conversation

@telecos
Copy link
Contributor

@telecos telecos commented Feb 12, 2026

This PR is originated after #2764 and #2684 where it was spotted the need to allow controlling strictness on the decoder for accepting files which may not be fully compliant to the spec. A solution was implemented to #2764 defaulting to lenient validation for BMP (which is also the case for JPEG and PNG for example). In #2684 it was spotted the need to allow forcing strictness of validation to allow control from the caller and a solution based on a boolean parameter was proposed. This PR is proposed a common solution for codecs allowing such control (at this point BMP and JPEG).

@telecos telecos marked this pull request as ready for review February 12, 2026 23:44
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.

1 participant