From: Robert L K. <rl...@al...> - 2000-05-20 01:11:23
|
Date: Fri, 19 May 2000 23:06:07 +0200 From: Thomas Tonino <tt...@bi...> I believe I found the cause of the wedge problem: the value of bk gets too high. The extra if in the following snippet makes the wedge look beautiful. Photos come out very nicely as well, both in ordered dither (199*199 matrix) and Floyd-Steinberg. Still using 0.1 and 0.699 for dither_set_black_lower and -_upper, respectively. if (bk > 0) { if ( bk >= 32000 ) bk = 32000; bk = bk * bk / 65536; c -= (d->k_clevel * bk) /128; m -= (d->k_mlevel * bk) /128; y -= (d->k_ylevel * bk) /128; I thought that the problem was that bk was declared int, but even declaring unsigned didn't help. I think what you really want is to cap it at d->density. I'm wondering if we cannot make processing more efficient by changing the: if (black != NULL) near the beginning of the main loop in if ((black != NULL) & (k != 0)) This would skip the black generating process for bright colors and white. That won't work if error diffusion is used. It might work if ordered dithering is used. In any event, this didn't work at all for me. Pull down http://www.tiac.net/users/rlk/colors.tif and print that. There is very severe excess black. -- Robert Krawitz <rl...@al...> http://www.tiac.net/users/rlk/ Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2 Member of the League for Programming Freedom -- mail lp...@uu... Project lead for The Gimp Print -- http://gimp-print.sourceforge.net "Linux doesn't dictate how I work, I dictate how Linux works." --Eric Crampton |