ClassCastException in PDXObjectImage.getMask
--------------------------------------------

                 Key: PDFBOX-892
                 URL: https://issues.apache.org/jira/browse/PDFBOX-892
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 1.3.1
            Reporter: Marko Mocnik


Certain /FlateDecode encoded images which contain a Mask Dictionary cause the 
getRGBImage() method to fail with the following exception:

java.lang.ClassCastException: org.apache.pdfbox.cos.COSStream cannot be cast to 
org.apache.pdfbox.cos.COSArray
        at 
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.getMask(PDXObjectImage.java:364)
        at 
org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:205)
        at 
org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.write2OutputStream(PDPixelMap.java:310)
        at 
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.write2file(PDXObjectImage.java:139)
        at ImagePdfBoxTest2.main(ImagePdfBoxTest2.java:41)

I will attach a simple test program and a test dokument which was created with 
OpenOffice 3.2.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to