I’m trying to automate colour corrections so that by putting one sample-point at the white spot and another at the black spot, then calling a script. This is to get round the fact that the automatic white balance tool is too hit-and-miss for my photos.
At the moment I’m doing the corrections with a hacked version of the old Whitebalance script from Luca de Alfaro, but that is slow and processor-intensive. If I use the white/black point pickers in the levels tool manually, I get the same result, but it’s a real faff to do it with the picker when compared to using sample-points.
So what I’d like to do is apply these black/white point pickers from within my script. So far I can get the colour and position of the sample points with:
(samplePoint (car (gimp-image-find-next-sample-point image 0)))
(x (car (gimp-image-get-sample-point-position image samplePoint)))
(y (cadr (gimp-image-get-sample-point-position image Sampleoint)))
(fg (car (gimp-image-pick-color image drawable x y TRUE TRUE 1)))
But I’ve completely failed to find a way to then replicate the effect of clicking on that point with the relevant picker to my chosen spots. Is this possible or am I just being excessively optimistic?
Thanks