Menu

#23 ClassCastException calling ImageXObject.getColorSpace()

0.1.2.1
closed-fixed
None
3
2015-04-29
2011-10-21
No

Hello,
we are using PdfClown to check the color profile of embedded images. Sometimes, we got a ClassCastException calling ImageXObject.getColorSpace().
I have attached a sample PDF with one image causing the exception.

This is part of the stack trace:

java.lang.ClassCastException: org.pdfclown.objects.PdfReference cannot be cast to org.pdfclown.objects.PdfName
at org.pdfclown.documents.contents.xObjects.ImageXObject.getColorSpace(ImageXObject.java:103)
at PdfQualityChecker.checkColorSpace(PdfQualityChecker.java:23)
at PdfQualityChecker.scanTree(PdfQualityChecker.java:80)
--- more ---

Discussion

  • Francesco Panico

     
  • Stefano Chizzolini

    • assigned_to: nobody --> stechio
     
  • Stefano Chizzolini

    ImageXObject's color space getter has been harmonized to deal with any color space definition.

    Fixed on 0.1.2-Fix branch (rev 200) and 0.2.0 trunk (rev 201).

    thank you

     
  • Stefano Chizzolini

    • status: open --> closed-fixed
    • Group: --> 0.1.2.1
    • Priority: 5 --> 3
     

Log in to post a comment.