Created attachment 7094 [details] screen_shot The file tests_private/xl/pcl6cet3.0/C420.bin page 13 has a difference when rendered with and without banding. The colors in the gradient are different. Attaching a png comparison.
Created attachment 7272 [details] simple example Yes without banding the color transformation is recognized as "identity" and in the banding case it is not. In the code we are using different branches of this logic depending on banding: if (icc_link->is_identity) { psrc_temp = &(psrc[0]); } else { /* Transform the color */ psrc_temp = &(psrc_cm[0]); gscms_transform_color(icc_link, psrc, psrc_temp, 2, NULL);
Below is a "fix" for the problem. As it turns out the non-banding code never installs the ICC procedures, the high level image code does this for all images, so banding used icc and non banding used device rgb. Is I read the ICC code it would probably complete the initialization of the color space if "setcolorspace" were called. PCL and XL can't do that for image color spaces. As I said before, this business of initializing the color space members here is not ideal. Perhaps the routines gx_install_Device[Gray|RGB]and friends could could be made public and we could call those routines from this code, I believe that would set all the colorspace members we need. Index: pxgstate.c =================================================================== --- pxgstate.c (revision 12196) +++ pxgstate.c (working copy) @@ -28,6 +28,7 @@ #include "gscoord.h" #include "gxcspace.h" /* must precede gscolor2.h */ #include "gscie.h" +#include "gsicc.h" #include "gsicc_manage.h" #include "gsimage.h" #include "gspath.h" @@ -333,6 +334,7 @@ pbase_pcs = gs_cspace_new_DeviceGray(pgs->memory); #ifdef ICCBRANCH pbase_pcs->cmm_icc_profile_data = pgs->icc_manager->default_gray; + pbase_pcs->type = &gs_color_space_type_ICC; rc_increment(pbase_pcs->cmm_icc_profile_data); #endif break; @@ -340,6 +342,7 @@ pbase_pcs = gs_cspace_new_DeviceRGB(pgs->memory); #ifdef ICCBRANCH pbase_pcs->cmm_icc_profile_data = pgs->icc_manager->default_rgb; + pbase_pcs->type = &gs_color_space_type_ICC; rc_increment(pbase_pcs->cmm_icc_profile_data); #endif break; @@ -351,6 +354,7 @@ cie_space = true; #ifdef ICCBRANCH pbase_pcs->cmm_icc_profile_data = pgs->icc_manager->default_rgb; + pbase_pcs->type = &gs_color_space_type_ICC; rc_increment(pbase_pcs->cmm_icc_profile_data); #endif break;
We need to study the performance of enabling the color conversion code before integrating the patch above: For example using a sample customer performance file 19_PCL6_A4_PictureSelection_26p_600dpi.xl with the patch: time ./pcl6 -sDEVICE=pbmraw -o /dev/null -r600 19_PCL6_A4_PictureSelection_26p_600dpi.xl 0m57.345s without: time ./pcl6 -sDEVICE=pbmraw -o /dev/null -r600 19_PCL6_A4_PictureSelection_26p_600dpi.xl 0m46.048s
Fixed in 12344.