> > Linear, Log, and sqrt are all common ways to scale histograms for
> > Perhaps we should make it an option in preferences (or in the histogram
> > display itself).
> sqrt() - I haddn't thought of that. That sounds plausibly like what
> Photoshop is using. I might have a play with that.
To me, it looks like Photoshop uses linear, but if there are some peaks that
are very high relative to the rest of the histogram, they don't show these
peaks completely (they are clipped off) in order to be able to show some
detail in the lower parts. I tried something similar in Gimp, and for a
number of images I tried, the histograms of Photoshop and the Gimp were very
If you want, I can post the code I used for it.
I'm not sure about how to determine the clipping, though; now I have done
something like (I don't have my code here with me) after the calculation of
max in the function that calculates the heights of all peaks (I forgot the
avg = ...
if (max > avg * 4)
max = avg * 4;
Note: the average is not the average as shown in the histogram widgt; it is
the average height of all peaks in the histogram which is something
But perhaps it is better to use the median instead of the average, or maybe
the 90% percentile or something.