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

unable to open png's generated by examples #206

Open
Parth opened this issue Jan 14, 2024 · 7 comments
Open

unable to open png's generated by examples #206

Parth opened this issue Jan 14, 2024 · 7 comments

Comments

@Parth
Copy link

Parth commented Jan 14, 2024

Pictured is the example I ran along with the output and the error message. Chrome is also not able to read the image. I'm actually not able to put any pdf through this example for previewing.

image
@s3bk
Copy link
Contributor

s3bk commented Jan 14, 2024

png might be broken. But you can decode it and re-encode it if you need to get it out.
I suspect it needs some headers.

@jakob-ledermann
Copy link
Contributor

I have a simliar problem with StreamFilter::CCITTFaxDecode. How would I write that reencoding?

@s3bk
Copy link
Contributor

s3bk commented Feb 7, 2024

@jakob-ledermann
I think you can just wrap it with this:
https://github.com/pdf-rs/fax/blob/master/src/tiff.rs#L9

@jakob-ledermann
Copy link
Contributor

@s3bk
Thanks for that information. Somehow I missed it.
Do you want a PR to add exporting StreamFilter::CCITTFaxDecode to the read example?

@s3bk
Copy link
Contributor

s3bk commented Feb 8, 2024

Yea, that would be an easy fix without modifying the api.

@shenshouer
Copy link

I met the same issue for png, how to solve ?

@s3bk
Copy link
Contributor

s3bk commented Dec 9, 2024

it needs a png header, I assume

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

4 participants