Re: Fix for 687403 Poor halftoning for 16 color (4bit) devices

"Igor V. Melichev" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Dan,

> From: "Dan Coby" <[email protected]>
> To: "Igor V. Melichev" <[email protected]>; "Gs-Code-Review" <[email protected]>
> Sent: Tuesday, April 06, 2004 10:48 AM
> Subject: RE: [gs-code-review] Fix for 687403 Poor halftoning for 16 color (4bit) devices 


> I have been debating with myself about if it is possible
> to use an RGBK process color model to get 16 shades.  Does
> anyone have any ideas?

Assuming RGBK is similar to CMYK,
I would assume implementing BG and UCR for RGBK.
Then check whether there exist such BG and UCR
that all 16 shades are obtained. The geometrical size
doesn't prohibit it since RGBK is 4 dimensional space
and the cube is 2x2x2x2, but requires the cube
to be applied AFTER BG and UCR.

As I know, the geometry of the standard VGA palette is like this :

1. The black color 000;
2. The white color 111;
3. 6 'opposite' corners of the cube : 001, 010, 100, 011, 101, 110
4. 6 'median' points, obtained by multiplying the corners with 0.5 .
5. 2 gray colors 111*1/3 and 111*2/3.

So the 2x2x2x2 cube in RGBK to be organized like this :

1. k = max (min(r,g), min(g,b), min(r,b));
2. ucr = (000 ? 111/3 : 111 ? 11*2/3 : [max(0,r-k),max(0,g-k),max(0,b-k)])
3. The section k=0 is the cube 000, 001, 010, 100, 011, 101, 110, 111
4. The section k=1 is 111/3, 001/2, 010/2, 100/2, 011/2, 101/2, 110/2, 111*2/3

This should work unless you interpolate between VGA colors,
and one of the interpolated colors is in the diagonal 000-111.
I guess you don't.
If one of the interpolated colors is in the diagonal,
the interpolation isn't linear.

Igor.
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.