On Monday 02 April 2007 19:12, Steven Howe wrote: > Hello, > > I'm looking to replicate the actions under '<Image>/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 -><- _______________________________________________ Gimp-user mailing list [email protected] https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
