From: Robert L K. <rl...@al...> - 2000-03-01 13:17:45
|
Date: Wed, 01 Mar 2000 12:28:22 +0000 From: Dave Hill <da...@mi...> The problem seems to be that after you have merged the layers (which you have to do by hand in Gimp 1.0.4), the image is "RGB-Alpha". If you just draw on the background, the image is "RGB" and works OK. So the problem is in "rgb_to_gray()" which isn't handling the alpha channel properly. OK, I think I know what's wrong here. I was dividing by the wrong constant. I believe that this happened initially when I was converting everything from 8 to 16 bits of precision. Around 1.74 I "fixed" the constant from 25500 to 255, which was incorrect. I've tested this and committed it to the mainline (at first I thought the constant was supposed to be 100, but that definitely didn't work :-) Mitch or Sven, could you apply this to 3.0 when you get diff -u -r1.79 print-util.c --- print-util.c 2000/02/29 02:59:14 1.79 +++ print-util.c 2000/03/01 12:47:41 @@ -809,7 +809,7 @@ *gray = vars->lut.composite[((rgb[0] * LUM_RED + rgb[1] * LUM_GREEN + rgb[2] * LUM_BLUE) * - rgb[3] / 255 + 255 - rgb[3])]; + rgb[3] / 25500 + 255 - rgb[3])]; gray ++; rgb += bpp; width --; -- 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 |