RE: Partial fix for Bug 687418 WTS does not work withbitcmyk driver

"Dan Coby" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Russell,

>Prevent check_device_separable from accepting non-consecutive
>bits as separable and linear.

I thought about this when I coded the routine but I did not consider
it to be important since I do not know of any devices for which this
is a problem.  I have no objection to the inclusion of this change.

Note:  If a device really wants to split up its bits, it can define
its own encode/decode color routines and set up its own shift/bits/
mask values.


>                              Modify gx_default_encode_color
>and gx_default_decode_color to work on devices for which
>max_color+1 != comp_bits[i].

This I consider a definite improvement.  Thanks.  


This patch also includes some C routines for checking the device's
encode/decode routines.  They should be included in the log message.
Are there also related additions to the lib/gs_*.ps routines?


Dan


-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Russell Lang
Sent: Friday, May 07, 2004 5:18 AM
To: [email protected]
Subject: [gs-code-review] Partial fix for Bug 687418 WTS does not work
withbitcmyk driver


Dan,

Note that this patch does not change color_info.gray_index,
which is not set by check_device_separable and so could be
wrong for some devices.

This patch also includes some test code in zcolor.c which can (or 
should) be omitted.  This test code checks whether the encode_color, 
decode_color, separable_and_linear routines are consistent.  


LOG MESSAGE:
Prevent check_device_separable from accepting non-consecutive
bits as separable and linear.  Modify gx_default_encode_color
and gx_default_decode_color to work on devices for which
max_color+1 != comp_bits[i].  Partial fix for bug #687418.  

DETAILS:
One example device for which max_color+1 != comp_bits[i] is
the Windows 16-bit native formats with 5:6:5 bits for RGB.
This has max_color set to 63 (not 31) to get the best results 
for green, but this did not work with the default encode_color
function.

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.