GNOME Bugzilla – Bug 133642
vertical stripes when converting image to B/W
Last modified: 2004-02-07 16:41:34 UTC
If this image http://ax5.com/selloG.png image is converted to B/W using: Image -> Mode ->Indexed (BW No dithering) (zoom in to 100% you will see strange stripes appear) It doesn't happen when converting from Gray to RGB to indexed.
Created attachment 24141 [details] Source image
Created attachment 24142 [details] Converted image with the stripes
Confirmed with 2.0pre2. There's definitely something funny going on here. Dave.
The alpha channel position was incorrectly set under the precise circumstances of this report. The following patch to app/core/gimpimage-convert.c fixes it. Will commit later. @@ -3047,7 +3047,10 @@ median_cut_pass2_no_dither_rgb (Quantize * grayscale drawables through the rgb pass2 functions */ if (gimp_drawable_is_gray (GIMP_DRAWABLE (layer))) - red_pix = green_pix = blue_pix = GRAY_PIX; + { + red_pix = green_pix = blue_pix = GRAY_PIX; + alpha_pix = ALPHA_G_PIX; + } has_alpha = gimp_drawable_has_alpha (GIMP_DRAWABLE (layer));
Fixed in CVS. When revisiting the code I noticed the same problem in the case of fixed dither (Positioned Color Dithering). Fixed as well. 2004-02-07 Pedro Gimeno * app/core/gimpimage-convert.c (median_cut_pass2_no_dither_rgb): Corrected position for alpha_pix in the case of grayscale images with custom or mono palette and no dither. Fixes bug #133642. (median_cut_pass2_fixed_dither_rgb): Ditto for fixed dither (Positioned Color Dither).