src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java

Print this page

        

@@ -159,17 +159,22 @@
 
         LCMS.colorConvert(this, in, out);
     }
 
     public void colorConvert(BufferedImage src, BufferedImage dst) {
-        if (LCMSImageLayout.isSupported(src) &&
-            LCMSImageLayout.isSupported(dst))
-        {
-            doTransform(new LCMSImageLayout(src), new LCMSImageLayout(dst));
+        LCMSImageLayout srcIL, dstIL;
+        
+        dstIL = LCMSImageLayout.createImageLayout(dst);
+        
+        if (dstIL != null) {
+            srcIL = LCMSImageLayout.createImageLayout(src);
+            if (srcIL != null) {
+                doTransform(srcIL, dstIL);
             return;
         }
-        LCMSImageLayout srcIL, dstIL;
+        }
+        
         Raster srcRas = src.getRaster();
         WritableRaster dstRas = dst.getRaster();
         ColorModel srcCM = src.getColorModel();
         ColorModel dstCM = dst.getColorModel();
         int w = src.getWidth();