I just downloaded (and installed and build) the 1.2.1. sources, and I 
was looking at the histogram code (because I wonder why the histogram 
always looks totally different than histograms from Photoshop or Paint 
Shop Pro) and I saw something (unrelated to what I was doing) that looks 
like a bug.

In gimphistogram.c there is a function to calculate the histogram for a 
subregion, declared as follows:

gimp_histogram_calculate_sub_region (GimpHistogram *histogram,
                    PixelRegion   *region,
                    PixelRegion   *mask)

In that function we have this code snippet:

  if (mask)
     gdouble masked;

     src = region->data;
     msrc = region->data;

I would think that msrc ought to be a pointer into the mask data instead 
of the region data, like this:

   msrc = mask->data;

Roel Schroeven

Reply via email to