summaryrefslogtreecommitdiff
path: root/plugins/fast_float/src/fast_float_sup.c
diff options
context:
space:
mode:
authorMarti Maria <marti.maria@littlecms.com>2023-05-16 16:32:42 +0200
committerMarti Maria <marti.maria@littlecms.com>2023-05-16 16:32:42 +0200
commite55b6fa4d3c5b7e08d9e4bc8c803a79ca908b5a4 (patch)
treeb36fdc835152ea9e9a6e25948fb1df88ae230b74 /plugins/fast_float/src/fast_float_sup.c
parentf087232ced02e34c36b88e9d75d071aa46fec0ff (diff)
downloadlcms2-master.tar.gz
add a check for cmsFLAGS_COPY_ALPHAHEADmaster
Thanks to ISOZAKI Nozomi to point out the issue.
Diffstat (limited to 'plugins/fast_float/src/fast_float_sup.c')
-rw-r--r--plugins/fast_float/src/fast_float_sup.c4
1 files changed, 3 insertions, 1 deletions
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;