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

None value for PNG filters #180

Open
omkar-mohanty opened this issue Apr 26, 2023 · 3 comments
Open

None value for PNG filters #180

omkar-mohanty opened this issue Apr 26, 2023 · 3 comments

Comments

@omkar-mohanty
Copy link
Contributor

While executing the read.rs example, I tried to extract images from a pdf with PNG images in it. The raw_image_data function returned None for filter , but shouldn't the correct returned filter be a FlateDecode ?

@s3bk
Copy link
Contributor

s3bk commented Apr 26, 2023

Sounds about right.

Could you adjust

pub fn raw_image_data(&self, resolve: &impl Resolve) -> Result<(Arc<[u8]>, Option<&StreamFilter>)> {
accordingly and make a PR?

@omkar-mohanty
Copy link
Contributor Author

Sure 👍 . I had a question though does using the raw_image_data on a PNG image return the IDAT chunk?

@s3bk
Copy link
Contributor

s3bk commented Apr 27, 2023

I don't think so. So you may have to do some reconstruction, and possibly add a as_png method that does this.

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

No branches or pull requests

2 participants