PDFRenderer encounters the following exception:
java.awt.color.CMMException: Not Implemented
IKVM.OpenJDK.SwingAWT.dll!sun.java2d.cmm.lcms.LCMS.DummyColorTransform.colorConvert() + 0x4d bytes
IKVM.OpenJDK.SwingAWT.dll!java.awt.image.ColorModel.getGray8TosRGB8LUT() + 0x1f3 bytes
IKVM.OpenJDK.SwingAWT.dll!java.awt.image.ComponentColorModel.setupLUTs() + 0x28d bytes
IKVM.OpenJDK.SwingAWT.dll!java.awt.image.ComponentColorModel.ComponentColorModel(java.awt.color.ColorSpace colorSpace = {java.awt.color.ICC_ColorSpace}, int[] bits = {int[1]}, bool hasAlpha = false, bool isAlphaPremultiplied = false, int transparency = 1, int transferType = 0) + 0x172 bytes
PDFRenderer.dll!com.sun.pdfview.PDFImage.DecodeComponentColorModel.DecodeComponentColorModel() + 0x44 bytes
PDFRenderer.dll!com.sun.pdfview.PDFImage.getColorModel() + 0x5e1 bytes
PDFRenderer.dll!com.sun.pdfview.PDFImage.parseData(byte[] data = {byte[3754608]}) + 0xb8 bytes
PDFRenderer.dll!com.sun.pdfview.PDFImage.getImage() + 0xa8 bytes
PDFRenderer.dll!com.sun.pdfview.PDFRenderer.drawImage(com.sun.pdfview.PDFImage image = {com.sun.pdfview.PDFImage}) + 0xfd bytes
PDFRenderer.dll!com.sun.pdfview.PDFImageCmd.execute() + 0x2b bytes
PDFRenderer.dll!com.sun.pdfview.PDFRenderer.iterate() + 0x1c0 bytes
PDFRenderer.dll!com.sun.pdfview.BaseWatchable.run() + 0x13f bytes
PDFRenderer.dll!com.sun.pdfview.BaseWatchable.execute(bool synchronous = true) + 0xd3 bytes
PDFRenderer.dll!com.sun.pdfview.BaseWatchable.go(bool synchronous = true) + 0x44 bytes
PDFRenderer.dll!com.sun.pdfview.PDFPage.getImage(int width = 617, int height = 787, java.awt.geom.Rectangle2D clip = {java.awt.Rectangle}, java.awt.image.ImageObserver observer = null, bool drawbg = true, bool wait = true) + 0x22e bytes
After a little research, it looks like most of the native source (including LittleCMS) was stripped from OpenJDK. I'm not sure where to go from here. Any help would be greatly appreciated.
Volker recently did some work in this area. Could you please try again with the new development snapshot:
http://weblog.ikvm.net/PermaLink.aspx?guid=1a2d289a-8394-4779-9056-aefeb101b3ba
The latest built still doesn't implement LCMS. It is implemented in OpenJDK using JNI but swapped with a dummy implementation.
I have test the follow line:
new java.awt.image.ComponentColorModel( ColorSpace.getInstance(ColorSpace.CS_GRAY), new int[]{1}, false, false, 1, 0 );
and it work without problems in the repository version. We use a GNU Classpath implementation now without sun.java2d.cmm.lcms.LCMS. All references to sun.java2d.cmm.lcms.LCMS.DummyColorTransform should be in dead code. I have checkin it for 3 weeks. You should test the latest snapshot from http://weblog.ikvm.net/.
If you can reproduce it with the latest snapshot then some Java sourse lines that reproduce the error will be very helpful.
Volker
You can reproduce the problem using a custom ColorSpace. PDFRenderer is loading its ColorSpace from a file, "sGray.icc". This results in a call to CMSManager.getModule() which returns the partially implemented LCMS. I can upload this for you and get you some source if you need it.
For now I have modified the PDFRenderer source to use ColorSpace.CS_GRAY.
Thanks for the tip with the custom ICC_Profile. I have checkin a junit test case that show the bug. Now I look for a fix.