ClassCastException calling ImageXObject.getColorSpace()
General-Purpose PDF Library for Java and .NET
Status: Beta
Brought to you by:
stechio
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 ---
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