EDIT: I had some bad information in this post originally and have updated it to be more accurate. In particular, one can no longer pass lists to the PDB when it is expecting vectors (you used to be able to do this way back when).In Script-fu, you do
not use commas to separate elements in a list. Just use spaces, tabs, and newlines. Also, if your list contains any variable names then you do not want to quote your list with the apostrophe; instead you will want to use the 'list' function.
For example,
(define x 10)
(define y 20)
'(10 20) ; is OK
'(x y) ; does not use the values for x and y, but instead creates a list of the two symbols.
(list 10 20) ; is OK
(list x y) ; evaluates the two variables, producing the list '(10 20)
As to the format for specifying a seven-point spline curve, the x and y coordinates follow the values that would appear in the corresponding Curves Tool graph as shown below (the text box in the upper-left contain the coordinates of the second point of the curve, circled in red).
Attachment:
SSspline-curve.png [ 28.78 KiB | Viewed 4024 times ]
The list should contain a series of alternating x and y values, each x corresponding to that point's horizontal position in the above graph and the y corresponding to the vertical position. To be safe, the x coordinate of the first point should always be "0", and of the last point it should always be "255".
For the seven points listed, the spline curve would be the list: '(
0 0 32 160 64 96 96 192 160 64 192 224 224 32) with x coordinates shown in blue and y in red.
(gimp-curves-spline drawable HISTOGRAM-VALUE 14 (list->vector '(0 0 32 160 64 96 96 192 160 64 192 224 224 32)))
Alternately, you could use
#(...) to build your vector out of constants. It behaves analogously to how
'(...) works for lists of constants.
(gimp-curves-spline drawable HISTOGRAM-VALUE 14 #(0 0 32 160 64 96 96 192 160 64 192 224 224 32))
If you've assigned those values to variables, or you've calculated them algorithmically, then you will have to use 'vector' to create your vector, instead of just quoting it ('vector' work just like 'list' but produces a vector instead of a list).
(gimp-curves-spline drawable HISTOGRAM-VALUE 14 (vector x0 y0 x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 x6 y6))