From: Thomas T. <tt...@bi...> - 2000-04-29 23:24:40
|
Robert L Krawitz wrote: > The current default is to start adding black at 30%. With plain > paper, it goes to all black at 50%; with glossy film (which works well > for glossy paper, too), it goes to all black at 80%. At anything much > less than 30%, the black dots start to become very noticeable. It's > probably worth a try, though (play with the dither_set_black_lower and > dither_set_black_upper calls in print-escp2.c). I think there is a problem in semantics with CMYK color. There are 4 values to control what is essentially a 3 dimensional color space. If I ignore this, the code seems to do the following: 1 - Finds how dark the requested CMY values are - but not the requested K value (tk). 2 - Finds what is more black: the requested K or the value computed above (not sure about this, this would bite us if people feed color separated data with its own black curve to us). 3 - We find where this black level is in the range between the upper and lower settings mentioned above. 4 - If below, print the CMY values. If above, print black. If in between, use a dither to determine whether black will be used or CMY. Am I missing something if I think we could just generate black according to steps 1, 2 and 3 and put this black value in the K buffer - and have the actual rendering dither decide where black must be printed? Where this dither prints black, CMY do not show up. I do not see what the extra dither here gains us. But I see a possible problem: it may decide not to print CMY at a certain pixel. Then the final dither comes along, finds no CMY and thus prints no CMY, but if it also does not have enough error yet for printing K, it leaves a hole - giving reduced density where CMY moves into black. Actually, step 1 seems a bit strange to me. It looks like a darkness is computed by adding densities. In offset printing, the color is analyzed in a different way. As first approximation, we would take the lowest of CMY and use that as a K value. Adding CMY is bad when printing saturated colors: for say a dark blue (which is magenta and red, and some yellow to make it real dark) the driver would decide that part of the CMY can be replaced with K because it is so dark - but it really should not replace more CMY than there is Y to replace. I would suggest finding the lowest of CMY, adding this to any K that we were given (probably will need a correction here later, as 100% CMY and 100% K should add up to 100% K, not 200%), determine how much of this K we are going to print as CMY, subtracting this from the CMY and using it as the K. The dither algorithm will then produce a K every now and then. When the K is produced, and at the same time a CM or Y would be printed, this dot is not shown - but for the error diffusion it works out as if it is - the color effectively disappears under the black dot. You have to rely on printer registration here - or you have to make the switch around 30% coverage, when there is often white between dots and misalignment doesn't matter that much. In offset printing it is normal to leave color behind black ink. In some cases, colors are boosted a bit when there is a lot of black - so a shadow in a colored object still feels black. Given that our dither takes care of the total amount of ink buildup, I feel it is better to just adjust the amount of black and let the dither handle the rest. With the above, we cannot get above 200 % - unless we believe it is not a good idea to remove all color from under black. Dark saturated colors will then get a 300% coverage. Maybe we need another mechanism to adjust those: not by shifting them to black, but by making them lighter overall. I just tried patching the code but now I get only an abrupt transition from greenish (CMY) to grey (K). Guess I'm a stupid coder or the black dither is not behaving as I expected. What I did was use this in print-dither.c instead of the dither lookup function. Be warned, it is useless, but shows my plan: else if (kdarkness < ub) /* Probabilistic */ { if (rb == 0) bk = ok; else bk = ok * ( (kdarkness - lb) / rb ); } else /* All black */ > If CMY print all at 70 % and you add 30% black, the black has very > little effect on overall density, because it overlaps most of the CMY. I > guess this is what is happening. > > Not really; no CMY is ever printed if black is. This works fine for > single dot size, but it may not work right for variable dot size. This doesn't really matter for the point I was trying to make. Say === is black formed by CMY and K is black formed by black ink. The layers could add as follows: === === === === === === === === === === === === K K K K K K K K K K K K K K K K K K K K K K K K In this case - and this is a very ordered dither - the black does not make the CMY any darker. CMY would not print where black is printed (nice idea - but hey, are black and CMY perfectly in registration?) but still 25 % of the paper will be white - even though you did add 50% black to the 75% grey that you had. > 1440x720 is very ugly in ordered dither mode, as only half the dots are > not printed. 1440 mode thus is only useable with some kind of error > diffusion or other mechanism that can use half dot spacings. Ordered > dither inherently cannot do this because a dot position that is printed > at level X will also be printed at a level higher than X. > > Hmm. I found 1440x720 quite usable with the iterated-2 ordered dither > -- much better than 720x720. However, it does band a lot. I think iterated-2 is regular enough not to be a problem. The question becomes: does going to 1440 gain you something in with this dither? If the first and last dots of a span are always printed, and you do not mind having some dot aggregration, you can cluster printer dots when you reached a certain density of single dots per mm: X XX XXX XXXX This would print as: X XX X X XX X Or something similar. That is, after the fixed dither an ink removal algorithm removes pixels that do not add to the image, but just soak the paper. Thomas |