[Gimp-user] curves spline batch
saulgoode at flashingtwelve.brickfilms.com
saulgoode at flashingtwelve.brickfilms.com
Tue Feb 10 09:58:26 PST 2009
Quoting Decimator Doseven <decimator007 at yahoo.com>:
> I am attempting to set up a batch that automatically runs
> gimp-curves-spline on a set of images. However, I have never used
> Scheme before and therefore am not sure why my script is returning
> "batch command experienced an execution error"
> :
> :
> (gimp-curves-spline RUN-NONINTERACTIVE image
> HISTOGRAM-VALUE 3 '(0 0 64 200 128 46))
Unfortunately, you cannot just pass a list of values to the
'gimp-curves-spline' PDB function; you must pass that list as an array
of 8-bit values.
You can create such an array with code similar to the following
(let* (
(my-curve (cons-array 6 'byte))
)
(aset! my-curve 0 0)
(aset! my-curve 1 0)
(aset! my-curve 2 64)
(aset! my-curve 3 200)
(aset! my-curve 4 128)
(aset! my-curve 5 46)
(gimp-curves-spline RUN-NONINTERACTIVE image
HISTOGRAM-VALUE 3 my-curve)
)
More information about the Gimp-user
mailing list