diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2019-02-13 12:01:54 -0800 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2019-02-19 08:30:46 -0800 |
commit | ba2043a548559d184cbfe90ca9884734dba6efdc (patch) | |
tree | 7af535a19adbdfcaecaa3d9d7468b1a85c348444 /cups | |
parent | 1521304bd0da395fd11a950ab82a40deebc1f8c4 (diff) | |
download | ghostpdl-ba2043a548559d184cbfe90ca9884734dba6efdc.tar.gz |
Bug 700584: cups device
The cups device has a pile of different color spaces. It is up to the cups device to
ensure that the color is handled properly for these. RGBA should certainly be treated
as a 32 3 component color similar to our pngalpha device. RGBW will be treated the same way.
Note that I looked at the output using Mike Sweet's rasterview program. I suspect there
probably is some work that needs to be done on that viewer to ensure proper viewing of
this type of data. With this patch gs is doing all it can.
Diffstat (limited to 'cups')
-rw-r--r-- | cups/gdevcups.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/cups/gdevcups.c b/cups/gdevcups.c index bd699fc27..52d93d12b 100644 --- a/cups/gdevcups.c +++ b/cups/gdevcups.c @@ -4147,6 +4147,18 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */ case CUPS_CSPACE_RGBA : case CUPS_CSPACE_RGBW : +#ifdef CUPS_RASTER_SYNCv1 + cups->header.cupsNumColors = 4; +#endif /* CUPS_RASTER_SYNCv1 */ + if (cups->header.cupsColorOrder != CUPS_ORDER_CHUNKED) + cups->header.cupsBitsPerPixel = cups->header.cupsBitsPerColor; + else + cups->header.cupsBitsPerPixel = 4 * cups->header.cupsBitsPerColor; + + cups->color_info.depth = 4 * cups->header.cupsBitsPerColor; + cups->color_info.num_components = 3; + break; + case CUPS_CSPACE_CMYK : case CUPS_CSPACE_YMCK : case CUPS_CSPACE_KCMY : @@ -4156,9 +4168,9 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */ cups->header.cupsNumColors = 4; #endif /* CUPS_RASTER_SYNCv1 */ if (cups->header.cupsColorOrder != CUPS_ORDER_CHUNKED) - cups->header.cupsBitsPerPixel = cups->header.cupsBitsPerColor; - else - cups->header.cupsBitsPerPixel = 4 * cups->header.cupsBitsPerColor; + cups->header.cupsBitsPerPixel = cups->header.cupsBitsPerColor; + else + cups->header.cupsBitsPerPixel = 4 * cups->header.cupsBitsPerColor; cups->color_info.depth = 4 * cups->header.cupsBitsPerColor; cups->color_info.num_components = 4; @@ -5916,12 +5928,6 @@ cups_print_planar(gx_device_printer *pdev, private int cups_spec_op(gx_device *dev_, int op, void *data, int datasize) { - /* Although not strictly DeviceN, the range of color models - this device supports presets similar issues. - */ - if (op == gxdso_supports_devn) { - return true; - } return gx_default_dev_spec_op(dev_, op, data, datasize); } |