From 60226f688f44c974c22eb97fe7a64e30da547b7d Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Mon, 12 Dec 2022 12:15:23 -0800 Subject: ENABLE_COLOR_REPLACE demo should be only for CMYK psd devices --- devices/gdevpsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/gdevpsd.c b/devices/gdevpsd.c index df054b8b1..cd7862813 100644 --- a/devices/gdevpsd.c +++ b/devices/gdevpsd.c @@ -152,8 +152,8 @@ psd_spec_op(gx_device *dev_, int op, void *data, int datasize) #if ENABLE_COLOR_REPLACE /* Demo of doing color replacement in the device in place of - standard ICC color management */ - if (op == gxdso_replacecolor) { + standard ICC color management. Only works for CMYK psd devices */ + if (op == gxdso_replacecolor && dev_->color_info.num_components >= 4) { color_replace_t *replace_data = (color_replace_t *)data; gx_device_color *pdc = replace_data->pdc; -- cgit v1.2.1