summaryrefslogtreecommitdiff
path: root/src/cmsvirt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmsvirt.c')
-rw-r--r--src/cmsvirt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmsvirt.c b/src/cmsvirt.c
index 9a7e718..eafa58b 100644
--- a/src/cmsvirt.c
+++ b/src/cmsvirt.c
@@ -934,6 +934,11 @@ cmsHPROFILE CreateNamedColorDevicelink(cmsHTRANSFORM xform)
// Colorant count now depends on the output space
nc2 ->ColorantCount = cmsPipelineOutputChannels(v ->Lut);
+ // Make sure we have proper formatters
+ cmsChangeBuffersFormat(xform, TYPE_NAMED_COLOR_INDEX,
+ FLOAT_SH(0) | COLORSPACE_SH(_cmsLCMScolorSpace(v ->ExitColorSpace))
+ | BYTES_SH(2) | CHANNELS_SH(cmsChannelsOf(v ->ExitColorSpace)));
+
// Apply the transfor to colorants.
for (i=0; i < nColors; i++) {
cmsDoTransform(xform, &i, nc2 ->List[i].DeviceColorant, 1);