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

[BUG] Unable to convert pdf images to grayscale "invalidBitsPerComponent" #570

Closed
rcorry opened this issue Oct 18, 2024 · 4 comments
Closed

Comments

@rcorry
Copy link

rcorry commented Oct 18, 2024

Description

Following this example from the documentation, an xobject is failing to convert to an image due to an invalid number of bits per component, in this case the error says there are 4. When printing out the value of the ximg.BitsPerComponent I can see the value is actually 8. This results in an error and the pdf is not converted to grayscale.

Expected Behavior

The xobject should be converted to an image and subsequently converted to grayscale before being added back to the pdf.

Actual Behavior

Steps to reproduce the behavior:

  1. Run this example code
  2. Convert the attached file, passing it in as the first argument
  3. See error

Attachments

test.pdf

Copy link

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/

@3ace
Copy link

3ace commented Oct 21, 2024

@rcorry Thank you for contacting us about this issue. We'll take a look at it and update you later if we have more info about this.

@unidoc unidoc deleted a comment Oct 24, 2024
@ipod4g
Copy link

ipod4g commented Dec 1, 2024

@rcorry The new UniPDF release is out https://github.com/unidoc/unipdf/releases/tag/v3.64.0 could you please test convert pdf images to grayscale?

@ipod4g
Copy link

ipod4g commented Dec 21, 2024

@rcorry I am closing this issue. You can review our solution, and if you continue to experience any problems, feel free to open a new issue here.

@ipod4g ipod4g closed this as completed Dec 21, 2024
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

3 participants