From e55b6fa4d3c5b7e08d9e4bc8c803a79ca908b5a4 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Tue, 16 May 2023 16:32:42 +0200 Subject: add a check for cmsFLAGS_COPY_ALPHA Thanks to ISOZAKI Nozomi to point out the issue. --- plugins/fast_float/src/fast_float_sup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/fast_float/src') diff --git a/plugins/fast_float/src/fast_float_sup.c b/plugins/fast_float/src/fast_float_sup.c index a3362b4..2955525 100644 --- a/plugins/fast_float/src/fast_float_sup.c +++ b/plugins/fast_float/src/fast_float_sup.c @@ -22,7 +22,6 @@ #include "fast_float_internal.h" - // This is the main dispatcher static cmsBool Floating_Point_Transforms_Dispatcher(_cmsTransform2Fn* TransformFn, @@ -39,6 +38,9 @@ cmsBool Floating_Point_Transforms_Dispatcher(_cmsTransform2Fn* TransformFn, // Special flags for reversing are not supported if (T_FLAVOR(*InputFormat) || T_FLAVOR(*OutputFormat)) return FALSE; + // Check consistency for alpha channel copy + if (*dwFlags & cmsFLAGS_COPY_ALPHA && (T_EXTRA(*InputFormat) != T_EXTRA(*OutputFormat))) return FALSE; + // Try to optimize as a set of curves plus a matrix plus a set of curves if (OptimizeMatrixShaper15(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE; -- cgit v1.2.1