[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Histogram White Spike bug in Brightness Contrast Filter dialog
From:       William Steidtmann <billstei () hbci ! com>
Date:       2010-12-02 17:04:16
Message-ID: 4CF7D190.3090301 () hbci ! com
[Download RAW message or body]

On 12/01/2010 01:19 PM, William Steidtmann wrote:
> On 12/01/2010 04:13 AM, Boudewijn Rempt wrote:
> > On Tuesday 30 November 2010, William Steidtmann wrote:
> > > Attached is a patch that eliminates the KisHistogram::KisHistogram()
> > > constructor that does not pass a "bounds" parameter when using a paint
> > > device, and modifies all calls to the new KisHistogram constructor that
> > > does use "bounds".  Most of these calls are (temporarily) passing
> > > exactBounds (and so this code does not change behaviour there), with the
> > > exception of the Brightness Contrast filter, which now passes image
> > > bounds, and thus fixes the White Spike bug in the Brightness Contrast
> > > filter dialog.  This is very much the same as the Levels Filter
> > > histogram patch (see Commit #1200357).
> > > 
> > > To recreate the (pre-patch) bug:
> > > 
> > > 1) Create a 10x10 image, 8 bit sRGB.
> > > 2) Set the color to a dark gray 92,92,92.
> > > 3) Use a pixel brush to paint all (most) of the image this dark gray.
> > > 4) Use menu Filter->Adjust->Brightness/Contrast curve...
> > > 5) Note that the graph has little or no indication (count) in the second
> > > quadrant where this dark gray should be.
> > > 
> > > After the patch, the second quadrant in step 5) will have an appropriate
> > > pixel count.
> > > 
> > > William Steidtmann
> > > 
> > Apart from the test that fails to compile, this patch does fix the issue. I'm \
> > wondering about the scaling of the histogram, though. The spikes are very small, \
> > barely visible. 
> Per the steps above, what I am seeing on the Brightness/Contrast filter
> graph is one full length vertical bar and some smaller ones, so I am not
> sure why you are not seeing at least that, however...
> 
> It occurs to me that the appearance of the (previously patched) Levels
> graph versus the Brightness/Contrast graph suggests that in the Levels
> case the largest vertical bar is:  the_largest_bin_count /
> total_bins_count (i.e.<= 1.0),  and in the Brightness/Contrast case the
> largest vertical bar is:  the_largest_bin_count / the_largest_bin_count
> (i.e. always 1.0).  Assuming I am right, I think the Levels graph
> scaling makes the most sense, and I will investigate this soon.
> 
As it turns out, the vertical scaling of the (maximum) histogram bars 
are (incl Gimp for comparison):

(percentage of histogram view height)
Levels Filter = 80%
Brightness/Contrast Filter = 100%
Gimp filters = 100%

I would suggest making the Levels filter match the others, and there are 
other improvements that can (and should) be made to the graphs, but I do 
not think now is the right time to make non-critical changes, given the 
pending RC release of Krita.

_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic