What calculation is the auto color balance performing on the channel histogram?
You can find the relevant calculations in the source code of
I have to say though that I never understood the reasoning behind its behavior: when pressing the Auto button (in the B&C or Color dialogs) repeatedly, you get increasing contrast with each click, until at some point the min and max are reset.
Also: why is the macro recorder recording:
run("Enhance Contrast", "saturated=0.35");
which is not reproducing the exact result of the Auto button?
I guess this is one of the IJ1 mysteries that only @Wayne will be able to explain?
Thanks. That is what I needed to know. I’ll only “press” the auto button once.