< prev index next >

src/java.desktop/share/native/liblcms/LCMS.c

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this
--- 1,7 ---
  /*
!  * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this

*** 186,12 ***
          {
              iccArray[j++] = icc;
          }
      }
  
      sTrans = cmsCreateMultiprofileTransform(iccArray, j,
!         inFormatter, outFormatter, renderingIntent, cmsFLAGS_COPY_ALPHA);
  
      (*env)->ReleaseLongArrayElements(env, profileIDs, ids, 0);
  
      if (sTrans == NULL) {
          J2dRlsTraceLn(J2D_TRACE_ERROR, "LCMS_createNativeTransform: "
--- 186,17 ---
          {
              iccArray[j++] = icc;
          }
      }
  
+     cmsUInt32Number dwFlags = 0;
+     if (T_EXTRA(inFormatter) > 0 && T_EXTRA(outFormatter) > 0) {
+         dwFlags |= cmsFLAGS_COPY_ALPHA;
+     }
+ 
      sTrans = cmsCreateMultiprofileTransform(iccArray, j,
!         inFormatter, outFormatter, renderingIntent, dwFlags);
  
      (*env)->ReleaseLongArrayElements(env, profileIDs, ids, 0);
  
      if (sTrans == NULL) {
          J2dRlsTraceLn(J2D_TRACE_ERROR, "LCMS_createNativeTransform: "
< prev index next >