Re: FW: Fix for 687418 WTS does not wor

"Russell Lang" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <409AD1D0.24159.467BFD0C@localhost>
Dan,

Sorry for not looking at this before...

> Fix for 687418 WTS does not work with bitcmyk driver.  This fix
> is applicable to most devices.
> 
> +    if (!is_power_of_two(pinfo->max_gray)
> +                   || !is_power_of_two(pinfo->max_color))
> +       return;

This test is wrong.
max_gray and max_color are expected to be 255, not 256.
You need to add a couple of +1's.

I found my old test code for making sure that encode_color and 
decode_color agree, and modified it to test if the 
gx_default_encode_color gave the same result for GX_CINFO_SEP_LIN.  I 
found that your check_device_separable was not setting 
separable_and_linear as expected because of the above bug.

I've also found that your code doesn't work with the display device 
because the display device is reopened when the callback is set, 
which causes color_info to be reset, which resets it to 
GX_CINFO_UNKNOWN_SEP_LIN.  Your check_device_separable doesn't get 
called again, and is private so I can't call it from the display 
device.  Two possible solutions are to either make 
check_device_separable public, or for me to patch the display device 
to explicitly set the comp_shift etc.  Any preferences?


Russell Lang                   [email protected]
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.