Hi Sander,
I have looked at your video (excellent way of showing these things by the way) and downloaded the image. There's nothing wrong with the HistogramTransformation interface; both the AutoZero and AutoClip functions are working as expected.
What happens is that your image has a tail of marginal values at the left side of the main histogram peak. This is quite frequent with linear raw images, and is just noise at pixel values with very low probabilities. These tails are not seen at 8-bit plotting resolution, due to rounding of values, but they are clearly shown at 16-bit.
I have prepared a set of screenshots where you'll see this more clearly:
The histograms of the image shown at 16-bit plot resolution:
After AutoZero clipping:
After AutoZero clipping, red histogram - the left tail is particularly relevant here:
After AutoZero clipping, green histogram - no tail, so the histogram is clipped just at the starting point of the main peak:
After AutoZero clipping, blue histogram - a short tail is also present:
Note that AutoZero has clipped just at the first nonzero histogram count on each channel, as expected. The AutoClip feature also works well. With the default 1% clipping value it indeed clips a small fraction of each main histogram peak. This can be fine tuned with the Auto Clip Setup dialog.
Note also that histograms are always calculated with 16-bit resolution in PixInsight (65536 discrete values). The different plot resolutions available on the HistogramTransformation interface allow you to *graphically* represent the histograms with reduced resolutions by interpolation; however all functions on this interface work with the original 16-bit histogram data, including AutoZero, AutoClip and all pixel counts.
Thank you for your video and cropped image. Let me know if this helps in clarifying things with respect to HistogramTransformation.