From ab0ecb7d44cfc2cf90dcb67c4bafc7ebf5bd5a58 Mon Sep 17 00:00:00 2001 From: Ken Sharp Date: Tue, 21 Sep 2021 14:21:26 +0100 Subject: Change the update_spot_equivalent_colors device method This device method was using the current colour space to retrieve equivalent colours for DeviceN/Separation inks, but that causes a problem for GhostPDF because, for images, it does not set the current colour space in the graphics state to be the image colour space. It turns out that the two places which call this device method; gx_install_Separation() and gx_install_DeviceN() already have the colour space that we want to use so its simple to just pass along the colour space, rather than forcing us to set the current space in the graphics state. I have updated update_spot_equivalent_cmyk_colors() so that if it is ever called with a NULL pointer for the colour space it will fall back to using the current colour space. This doesn't cause any diffs, but it does mean that when pdfi draws an image in a Separation or DeviceN space, the graphics library uses the correct colour space to determine the spot equivalents. --- base/gscdevn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/gscdevn.c') diff --git a/base/gscdevn.c b/base/gscdevn.c index 41febb7f9..a7a933505 100644 --- a/base/gscdevn.c +++ b/base/gscdevn.c @@ -747,7 +747,7 @@ gx_install_DeviceN(gs_color_space * pcs, gs_gstate * pgs) if (code >= 0) { if (dev_proc(pgs->device, update_spot_equivalent_colors)) code = dev_proc(pgs->device, update_spot_equivalent_colors) - (pgs->device, pgs); + (pgs->device, pgs, pcs); } return code; } -- cgit v1.2.1