Bug 692334

Summary: PS3 CET file 12-07D.PS gets wrong colors on page 3 (GLOBINT)
Product: Ghostscript Reporter: Ray Johnston <ray.johnston>
Component: ColorAssignee: Ray Johnston <ray.johnston>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: master   
Hardware: All   
OS: All   
Customer: Word Size: ---

Description Ray Johnston 2011-07-08 17:23:33 UTC
Created attachment 7657 [details]
12-07D.PS

The file (and the slightly reduced version) show wrong colors on the Global
Interference page (page 3)

With the ppmraw device, a gray areas of images are rendered as shades of red.
Different devices show different color differences. With the pkmraw device
the images are mostly cyan.

command line:

   gswin32c -dJOBSERVER 12-07D.PS 

the default window display is RGB and shows the same thing as ppmraw. Using
-dDisplayFormat=16#20808 will have CMYK output similar to pkmraw.

I determined that this was due to the gscms_transform_color only returning a
single component (instead of 3 or 4) after gscms_transform_color_buffer was
called and changed the link_handle's OutputFormat to 1 component (from the
expected 3 or 4).

In a phone call with Michael Vrhel, we determined this is most likely due to
the 'znulldevice' procedure (which is used in this CET) setting its device
profile from the current device (e.g. ppmraw) without regard for the mismatch
between the color_info (num_components, etc.). With a different device profile,
we would have a different link handle and avoid the setting the OutputFormat
to an incorrect value.

Michael will also investigate whether or not gscms_transform_color_buffer
should ever change the num_channels rather than just warning or error on
mismatch.

I have no idea why this showed up on the tagfix branch testing but it probably
is due to the differences in the way profiles are accessed from the device.
Comment 1 Michael Vrhel 2011-07-08 18:16:56 UTC
Assigning back to Ray as he has and knows all that needs to be done at this time and has kindly offered to fix.  Thanks Ray.