----- Original Message ----

From: Sven Neumann <s...@gimp.org>
To: Decimator Doseven <decimator...@yahoo.com>
Cc: gimp-user@lists.XCF.Berkeley.EDU
Sent: Tuesday, February 10, 2009 4:11:21 PM
Subject: Re: [Gimp-user]  curves spline batch

On Tue, 2009-02-10 at 13:23 -0800, Decimator Doseven wrote:

>>                     (gimp-curves-spline image
>>                         HISTOGRAM-VALUE 6 my-curve)

>You are passing the image ID to the gimp-curves-spline procedure but it
>expects the drawable ID.

The script is now working.  I fixed the issue you mentioned, and also found 
that I needed to change the command I was using to call the script.

The windows batch command I am using to call the script is now:
gimp-console-2.6.exe -i --verbose -b "(color-curve 
\"C:\\gimpbatchtest\\*.tiff\")" -b "(gimp-quit 0)"

And the script itself:

(define (color-curve pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
    (while (not (null? filelist))
        (let* ((filename (car filelist))
            (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
            (write filename)
                (drawable (car (gimp-image-get-active-layer image))))
                    (let* (
                    (my-curve (make-vector 6 'byte))
                    (vector-set! my-curve 0 0)
                    (vector-set! my-curve 1 0)
                    (vector-set! my-curve 2 208)
                    (vector-set! my-curve 3 17)
                    (vector-set! my-curve 4 255)
                    (vector-set! my-curve 5 255)
                    (gimp-curves-spline drawable
                        HISTOGRAM-VALUE 6 my-curve)
                (gimp-file-save RUN-NONINTERACTIVE image drawable filename 
                (gimp-image-delete image))
            (set! filelist (cdr filelist)))))

Again, thanks for all the help, I was utterly clueless before.


Gimp-user mailing list

Reply via email to