[Gimp-developer] still the same bug

Geert Jordaens geert.jordaens at telenet.be
Tue May 1 02:02:51 PDT 2007


I once wrote a path for it, this included the possibility of disabling 
the histogram correction (by setting the values out of range).
It seems that a more recent patch reversed this option.
Probably the out of range option was not the best way of implementing 
it, however the function does make sense
for line-art and B&W photo's see bug #72862.

Revision *16861* 
<http://svn.gnome.org/viewcvs/gimp?view=revision&revision=16861> - (view 
<http://svn.gnome.org/viewcvs/gimp/trunk/plug-ins/common/despeckle.c?revision=16861&view=markup>) 
(annotate 
<http://svn.gnome.org/viewcvs/gimp/trunk/plug-ins/common/despeckle.c?annotate=16861>) 
- [select for diffs] 
<http://svn.gnome.org/viewcvs/gimp/trunk/plug-ins/common/despeckle.c?r1=16861&view=log> 


2005-03-11  Sven Neumann  <sven at gimp.org <mailto:sven at gimp.org>>

	* plug-ins/common/despeckle.c: test intensity against white and
	black level, not only the red channel. Improved border behavior.
	Iterate over the pixels row-by-row, instead of jumping through the
	data column-wise.

...

Revision *15374* <http://svn.gnome.org/viewcvs/gimp?view=revision&revision=15374> -
2004-10-30  Sven Neumann  <sven at gimp.org <mailto:sven at gimp.org>>

	* plug-ins/common/despeckle.c: applied a patch from Geert Jordaens
	that improves the Despeckle algorithm. See bug #72862 <http://bugzilla.gnome.org/show_bug.cgi?id=72862>.

Right now I don't have the tme to followup a bug report or create a complete patch.

          for (v = ymin; v < ymax; v++)
            {
              gint off2 = v * width * bpp;

              for (u = xmin, off2 += xmin * bpp; u < xmax; u++, off2 += bpp)
                {
                  guchar value = pixel_luminance (src + off2, bpp);

/*                if (value < black_level) Allow no histogram correction on line art or b&w*/
                  if (value < black_level && filter_type & FILTER_ADAPTIVE)
                    {
                      hist0++;
                    }

/*                else if (value > white_level) Allow no histogram correction on line art or b&w*/
                  else if (value > white_level && filter_type & FILTER_ADAPTIVE)
                    {
                      hist255++;
                    }
                  else
                    {
                      buf[count]  = src + off2;
                      ibuf[count] = value;
                      count++;
                    }
                }
            }



Geert Jordaens


Luis A. Florit wrote:
> Pals,
>
>     I reported this bug in this list some time ago, and got no
> answer (I think), and the 2.3.16 version still has the same bug:
> The despeckle plugin shifts the image one pixel to the right,
> and one to the bottom. Consequently, it is essentially useless.
> If you draw in the middle of a white background a black cross
> like this:
>
>  x
> xxx
>  x
>
> and run the despeckle plugin with radius 1, you get this asymmetric
> output:
>
>  x
> xxx
>  xx
>
>     Thanks,
>
>         Luis.
>
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer at lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/gimp-developer/attachments/20070501/2d2f0190/attachment-0001.html 


More information about the Gimp-developer mailing list