8323210: Update the usage of cmsFLAGS_COPY_ALPHA

Backport-of: aba19334ea
This commit is contained in:
Sergey Bylokhov
2024-03-02 02:44:31 +00:00
committed by Vitaly Provodin
parent c3a5eca3d7
commit b237b46531
2 changed files with 8 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
* 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
@@ -188,8 +188,13 @@ JNIEXPORT jlong JNICALL Java_sun_java2d_cmm_lcms_LCMS_createNativeTransform
}
}
cmsUInt32Number dwFlags = 0;
if (T_EXTRA(inFormatter) > 0 && T_EXTRA(outFormatter) > 0) {
dwFlags |= cmsFLAGS_COPY_ALPHA;
}
sTrans = cmsCreateMultiprofileTransform(iccArray, j,
inFormatter, outFormatter, renderingIntent, cmsFLAGS_COPY_ALPHA);
inFormatter, outFormatter, renderingIntent, dwFlags);
(*env)->ReleaseLongArrayElements(env, profileIDs, ids, 0);

View File

@@ -52,7 +52,7 @@ import static java.awt.image.BufferedImage.TYPE_USHORT_GRAY;
/*
* @test
* @bug 8012229 8300725 8279216
* @bug 8012229 8300725 8279216 8323210
* @summary one more test to check the alpha channel
*/
public final class ColCvtAlphaDifferentSrcDst {