summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/base/gxiscale.c16
-rw-r--r--gs/base/lib.mak2
2 files changed, 15 insertions, 3 deletions
diff --git a/gs/base/gxiscale.c b/gs/base/gxiscale.c
index 5720a0d39..3c15ba312 100644
--- a/gs/base/gxiscale.c
+++ b/gs/base/gxiscale.c
@@ -43,6 +43,7 @@
#include "gscspace.h" /* Needed for checking is space is CIE */
#include "gsicc_cache.h"
#include "gsicc_manage.h"
+#include "gsicc.h"
static void
decode_sample_frac_to_float(gx_image_enum *penum, frac sample_value, gs_client_color *cc, int i);
@@ -712,8 +713,19 @@ image_render_interpolate(gx_image_enum * penum, const byte * buffer,
decode_sample_frac_to_float(penum, psrc[j], &cc, j);
}
}
- code = (pactual_cs->type->remap_color)
- (&cc, pactual_cs, &devc, pis, dev, gs_color_select_source);
+ /* If the source colors are LAB then use the mapping
+ that does not rescale the source colors */
+ if (gs_color_space_is_ICC(pactual_cs) &&
+ pactual_cs->cmm_icc_profile_data != NULL &&
+ pactual_cs->cmm_icc_profile_data->islab) {
+ code = gx_remap_ICC_imagelab (&cc, pactual_cs, &devc,
+ pis, dev,
+ gs_color_select_source);
+ } else {
+ code = (pactual_cs->type->remap_color)
+ (&cc, pactual_cs, &devc, pis, dev,
+ gs_color_select_source);
+ }
}
if (code < 0)
return code;
diff --git a/gs/base/lib.mak b/gs/base/lib.mak
index abb7b853d..b2fcd10e0 100644
--- a/gs/base/lib.mak
+++ b/gs/base/lib.mak
@@ -2590,7 +2590,7 @@ $(GLOBJ)gxiscale.$(OBJ) : $(GLSRC)gxiscale.c $(AK) $(gx_h)\
$(gxdevmem_h) $(gxfixed_h) $(gxfrac_h) $(gximage_h) $(gxistate_h)\
$(gxmatrix_h) $(siinterp_h) $(siscale_h) $(stream_h) $(vdtrace_h)\
$(gscindex_h) $(gxcolor2_h) $(gscspace_h) $(gsicc_cache_h)\
- $(gsicc_manage_h) $(MAKEDIRS)
+ $(gsicc_manage_h) $(gsicc_h) $(MAKEDIRS)
$(GLCC) $(GLO_)gxiscale.$(OBJ) $(C_) $(GLSRC)gxiscale.c
# ---------------- Display Postscript / Level 2 support ---------------- #