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

Update PNGImage.as #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update PNGImage.as #381

wants to merge 1 commit into from

Conversation

teuf22
Copy link

@teuf22 teuf22 commented Feb 6, 2017

Throw error message for unsupported PNG transparency mode instead of failing silently.

Throw error message for unsupported PNG transparency mode instead of failing silently.
Copy link
Member

@GhaziTriki GhaziTriki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In issue #292 there is a link of the implementation for transparent PNG. It would be nice to have that in your pull request.

@GhaziTriki
Copy link
Member

More details can also be found under this issue #186

@teuf22
Copy link
Author

teuf22 commented Feb 7, 2017

Yes, it would be nice to have a fix. This is a major limitation of AlivePDF. A few notes on the topic:

  • patches suggested earlier in issues don't add transparency support. They remove the alpha channel, rather than carrying it to the PDF. Depending on the PNG, this may give weird results. Years ago somebody wrote real PNG alpha support, but the links to it have disappeared.
  • the warning I added is for PNG simple transparency. This is not for PNG alpha transparency, which is much more common. Without the warning, the code will crash without any message (for alpha PNG at least there is a message).

I don't have the bandwidth to do the project of adding PNG transparency now unfortunately...

@GhaziTriki
Copy link
Member

We may have some available resource available in the coming days and we will look how to add the alpha lyer support for PNG.
@teuf22 Are you still using AlivePDF in production?

@teuf22
Copy link
Author

teuf22 commented Feb 7, 2017

This is used in production, but being phased out. I have a few PNGs testcases I can contribute, if this helps.

@GhaziTriki
Copy link
Member

@teuf22 It would be nice if you can provide those PNG tastcases, it will help us for sure. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants