Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8301837

java.awt.color.CMMException - when calling toRGB() with a certain ICC profile

XMLWordPrintable

    • 2d
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Microsoft Windows [Version 10.0.19045.2486]
      java version "19.0.2" 2023-01-17
      Java(TM) SE Runtime Environment (build 19.0.2+7-44)
      Java HotSpot(TM) 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      CMMException when calling toRGB() with a certain ICC profile

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no exception
      ACTUAL -
      Exception in thread "main" java.awt.color.CMMException: LCMS error 13: Couldn't link the profiles
              at java.desktop/sun.java2d.cmm.lcms.LCMS.createNativeTransform(Native Method)
              at java.desktop/sun.java2d.cmm.lcms.LCMS.createTransform(LCMS.java:117)
              at java.desktop/sun.java2d.cmm.lcms.LCMSTransform.doTransform(LCMSTransform.java:149)
              at java.desktop/sun.java2d.cmm.lcms.LCMSTransform.colorConvert(LCMSTransform.java:648)
              at java.desktop/java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:224)
              at jdk9test.PDFBOX5563CMM.main(PDFBOX5563CMM.java:19)

      ---------- BEGIN SOURCE ----------

      import java.awt.color.ICC_ColorSpace;
      import java.awt.color.ICC_Profile;
      import java.io.IOException;
      import java.io.InputStream;
      import java.net.URL;


      public class PDFBOX5563CMM
      {
          public static void main(String[] args) throws IOException
          {
              System.out.println(System.getProperty("java.version"));
              InputStream is = new URL("https://issues.apache.org/jira/secure/attachment/13055078/PDFBOX-5563.icc").openStream();
              ICC_Profile profile = ICC_Profile.getInstance(is);
              ICC_ColorSpace cs = new ICC_ColorSpace(profile);
              cs.toRGB(new float[cs.getNumComponents()]);
          }
      }

      ---------- END SOURCE ----------

      FREQUENCY : always


        1. CGATS21_CRPC7.icc
          3.30 MB
          Harshitha Onkar
        2. PDFBOX5563CMM.java
          0.6 kB
          Praveen Narayanaswamy

            serb Sergey Bylokhov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: