RSS/Atom feed Twitter
Site is read-only, email is disabled

looking for examples; scriptfu or python tool/color tools/curves... functions

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

looking for examples; scriptfu or python tool/color tools/curves... functions Steven Howe 03 Apr 00:12
  looking for examples; scriptfu or python tool/color tools/curves... functions Joao S. O. Bueno Calligaris 03 Apr 05:55
Steven Howe
2007-04-03 00:12:07 UTC (almost 18 years ago)

looking for examples; scriptfu or python tool/color tools/curves... functions

Hello,

I'm looking to replicate the actions under '/Tools/Color Tools/curves...'
I'm attempting to automate a bell curve overlay of a mask. From a trace (using strace)
the order looks something like:
"gimp_curves_explicit"
"gimp_curves_spline"
"plug_in_curve_bend"
"plug_in_curve_bend_Iterator"

Any example code (python preferred, but if I must learn script-fu ...), please send my way.

Thanks,
Steven Howe

Joao S. O. Bueno Calligaris
2007-04-03 05:55:15 UTC (almost 18 years ago)

looking for examples; scriptfu or python tool/color tools/curves... functions

On Monday 02 April 2007 19:12, Steven Howe wrote:

Hello,

I'm looking to replicate the actions under '/Tools/Color Tools/curves...'
I'm attempting to automate a bell curve overlay of a mask. From a trace (using strace)
the order looks something like:
"gimp_curves_explicit"
"gimp_curves_spline"
"plug_in_curve_bend"
"plug_in_curve_bend_Iterator"

Any example code (python preferred, but if I must learn script-fu ...), please send my way.

Thanks, Steven Howe

Hi Steven -
I have a script that makes use of the existing call to curves, please take a look there:

http://www.pion.com.br/~gwidion/python/set_colormap.py (no it was not online in any organized place, I just copied the file there now)

As for the script, it maps the colors of a palette to the value of colors in an RTB image, much like the"map to gradient" GIKMP plug-in does, and it uses the curves call to achieve a fast color remapping.

As for the "I must learn script fu" part, I'd say - "no you don't". With all due respect to all script-fu hackers, and even more to its maintainers, it is a toy next to a fully featured language like python.

The plugion does not use the curves-spline call ... but a quick hack at the python console gave me a working example here: (I could blindly run this curve in most pictures with my now-broken camera)

pdb.gimp_curves_spline(drw, HISTOGRAM_VALUE, 10, (0,0, 64,56, 128,128, 192,200, 255,255))

Good luck there - do not hesitate to ask furhter if you need.

js ->