summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2012-05-10 13:24:15 -0700
committerMichael Vrhel <michael.vrhel@artifex.com>2012-05-10 13:24:15 -0700
commit54ecaf86c6fa0c4a31fb17e0c21361cb134ec376 (patch)
tree3ca0732854010633d79a69840320051f8032f566
parent79925e26467289515d4cf499d2c3a2d3b1cdcaa4 (diff)
CIELAB vector and CIELAB images have to use a slightly different remap proc.
The image data is already scaled as needed for the ICC code to handle directly. Vector colors require the decode from real CIELAB values. This fix was missing in the in image interpolation code. Fix for Bug 692885
-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 ---------------- #