AlivePDF icon indicating copy to clipboard operation
AlivePDF copied to clipboard

Update PNGImage.as

Open teuf22 opened this issue 9 years ago • 5 comments

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

teuf22 avatar Feb 06 '17 18:02 teuf22

More details can also be found under this issue #186

GhaziTriki avatar Feb 07 '17 14:02 GhaziTriki

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...

teuf22 avatar Feb 07 '17 15:02 teuf22

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?

GhaziTriki avatar Feb 07 '17 15:02 GhaziTriki

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

teuf22 avatar Feb 07 '17 16:02 teuf22

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

GhaziTriki avatar Feb 07 '17 16:02 GhaziTriki