[ 
https://issues.apache.org/jira/browse/PDFBOX-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13992584#comment-13992584
 ] 

Juraj Lonc commented on PDFBOX-2067:
------------------------------------

My problem was, that I was adding some images and then reading xobjects from 
page's resources. This gave me an exception:

Exception in thread "main" java.lang.ClassCastException: 
java.awt.image.DataBufferInt cannot be cast to java.awt.image.DataBufferByte
        at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:124)
        at org.apache.pdfbox.filter.Filter.decode(Filter.java:58)
        at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:337)
        at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:278)
        at org.apache.pdfbox.cos.COSStream.getDecodeResult(COSStream.java:235)
        at 
org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.<init>(PDImageXObject.java:94)
        at 
org.apache.pdfbox.pdmodel.graphics.PDXObject.createXObject(PDXObject.java:65)
        at 
org.apache.pdfbox.pdmodel.PDResources.getXObjects(PDResources.java:247)

It took me a half day to track the cause down to that single line ;)
But I like brain teasers ;)

> Error creating JPEG image with SMask
> ------------------------------------
>
>                 Key: PDFBOX-2067
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2067
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0
>            Reporter: Juraj Lonc
>            Assignee: Tilman Hausherr
>         Attachments: PDFBOX-2067_JPEGFactory.diff
>
>
> JPEGFactory.createFromImage() has problems with images with transparency 
> (alpha data).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to