phax / ph-commons

Java 11 Library with tons of utility classes required in all projects
Apache License 2.0
30 stars 18 forks source link

UnsupportedOperationException in PLImage #9

Closed trautvetter closed 6 years ago

trautvetter commented 6 years ago

Hi Philip, I'm getting an UnsupportedOperationException in PLImage using certain images. The exception message is:

Caused by: java.lang.UnsupportedOperationException: BITMASK Transparency JPEG compression is not useful, use LosslessImageFactory instead

My BufferedImage is obtained by from a URL however I'm sorry but I can't give that to you so instead I have attached the image itself.

nrl-manly16

I've been able to implement my own AbstractPLImagewhich uses LosslessFactory.createFromImage() to return a PDImageXObject and use this class in place of your PLImage. However I was wondering if you were aware of this problem and decided to raise this issue.

Thank you.

phax commented 6 years ago

Hi @trautvetter - this is an issue in the PDF layout engine so I moved it over to https://github.com/phax/ph-pdf-layout/issues/3 and closing it here.