[gs-cvs] rev 8290 - trunk/gs/src
marcos at ghostscript.com
marcos at ghostscript.com
Sun Oct 14 23:43:04 PDT 2007
Author: marcos
Date: 2007-10-14 23:43:04 -0700 (Sun, 14 Oct 2007)
New Revision: 8290
Modified:
trunk/gs/src/gdevpx.c
Log:
Added code to the pxlcolor device (gdevpx.c) to set the color space even
if the test for "portrait transformations" fails.
DETAILS:
The pclxl_begin_image() function performs a rather complicated test to
see if the image transformation can be "handled" (line 1434). If this
test fails the routine falls through to using gx_default_begin_image().
However, in this case the pcl-xl color space is never set and if
the previous color space was eGray the pcl-xl stream will fail with
ExtraData (because 3 times as much data as expected will be written).
Presumably the inverse is also true, but I don't have a test case for it.
The solution is to call pclxl_set_color_space() in the use_default
case (a possibly more correct solution would be to call
pclxl_set_color_palette()).
EXPECTED DIFFERENCES:
None. The nightly regression doesn't test the pxlcolor device.
Modified: trunk/gs/src/gdevpx.c
===================================================================
--- trunk/gs/src/gdevpx.c 2007-10-12 20:22:08 UTC (rev 8289)
+++ trunk/gs/src/gdevpx.c 2007-10-15 06:43:04 UTC (rev 8290)
@@ -1534,6 +1534,10 @@
gs_free_object(mem, row_data, "pclxl_begin_image(rows)");
gs_free_object(mem, pie, "pclxl_begin_image");
use_default:
+ if (dev->color_info.num_components == 1)
+ pclxl_set_color_space(xdev, eGray);
+ else
+ pclxl_set_color_space(xdev, eRGB);
return gx_default_begin_image(dev, pis, pim, format, prect,
pdcolor, pcpath, mem, pinfo);
}
More information about the gs-cvs
mailing list