Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Decoder::read_header_info method #353

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

fintelia
Copy link
Contributor

Adds a method on Decoder to read the PNG header before starting the main decoding process. This is useful because decoding limits can still be set after the method has been called, which is required to properly implement the image::ImageDecoder trait in a way that doesn't risk an OOM.

src/decoder/mod.rs Outdated Show resolved Hide resolved
@fintelia fintelia merged commit 1946130 into image-rs:master Aug 12, 2022
@fintelia fintelia deleted the read-header-info2 branch September 4, 2022 20:01
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.

2 participants