[gs-bugs] [Bug 691495] Wrong colours if GS called by GSView

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Tue Aug 3 19:27:25 UTC 2010


--- Comment #13 from Robin Watts <robin.watts at artifex.com> 2010-08-03 19:27:16 UTC ---
The following command:

 gs\debugbin\gswin32c.exe -f "red.ps"


 gs\debugbin\gswin32c.exe -c "<< /DisplayFormat 16#30884 /OutputDevice /display
>> setpagedevice" -f "red.ps"

displays a large red page, as expected. This command however, does not:

 gs\debugbin\gswin32c.exe -dNODISPLAY -c "<< /DisplayFormat 16#30884
/OutputDevice /display >> setpagedevice" -f "red.ps"

The difference does not appear to be in anything the display device is doing,
rather it is to do with the mapping of colors.

In the two working cases, we start with a display device already defined. When
we come to start drawing the red rectangle, the current color is an ICC one,
that "concretises" to rgb. This calls into the display device, and we get the
expected output.

In the non-working case, when we come to start drawing the red rectangle, the
current color is an ICC one, that "concretises" to gray. This means that the
drawing operations make the following sequence of function calls:

 gs_rectfill ->
  gx_remap_ICC ->
   gx_remap_concrete_ICC ->
    gx_remap_concrete_DGray ->
     cmap_gray_direct ->

This gives us the wrong result (we don't want a greyscale rendition of red, we
want red!). In addition I think something else goes wrong as we don't reach the
showpage in the failing cases.

My working hypothesis (which may be horribly wrong) is that the initial ICC
color is set with reference to the pagedevices default space (i.e. if we have a
pagedevice that is natively RGB, the ICC color will 'concretise' to RGB).

It seems that when the pagedevice is reset we should re-evaluate the color -
this doesn't appear to be happening. This will require a lot more digging, and
probably some advice from Michael.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list