I have been writing code in the python-fu console of gimp and I wanted to find the minimum of an image histogram (the pixel intensity value with the least frequency).
There are two functions in the procedural database that deals with histograms - pdb.gimp_drawable_histogram()
and pdb.python_fu_histogram_export()
. The first function pdb.gimp_drawable_histogram()
is not useful for me because it does not give me the histogram minimum. The second function pdb.python_fu_histogram_export()
does exactly what I want, but it exports the result into a .csv file and prevents me from accessing the values within the console.
I can get around this by exporting the .csv function first, followed by importing the .csv file back into the console and accessing the values. But this seems like a rather ugly and inefficient way to do it.
Is there a way to access the histogram values without exporting it to a .csv and then back into the console?