Roel Schroeven wrote: > > Austin Donnelly wrote: > > > So, fixing this bug means that the Levels tool, the Threshold tool, > > and the Equalise tool will all also change their behaviour: currently > > they use a histogram of the entire layer, but restrict their changes > > to the current selection. Fixing the bug means that the histogram > > will only be calculated for within the selection too. Is this the > > desired behaviour? > > If the other tools pass a null pointer for the mask, the histogram is still > calculated for the entire layer, so I think this shouldn't be a problem. I have commited this fix (and also your median calculation fix) to both the stable and devel branches of gimp. The original behaviour resulted in a totaly corrupt the histogram if you tried to use it with a mask. I'm not sure if the tools should be modified to stop computing the histogram through the current mask or not. Clearly the original intent of the code was to use the mask in the calculation. Thanks for digging these bugs up, Jay Cox jaycox@xxxxxxxx