[Gimp-user] 'gimp-levels-stretch' in batch mode

Sven Neumann sven at gimp.org
Sun Mar 22 13:02:55 PDT 2009


Hi,

On Sun, 2009-03-22 at 20:57 +0100, wwaser at web.de wrote:

> I also found the function 'gimp-levels-stretch' in the Script-Fu
> Procedure Browser and tried to adapt the example script:
> 
> -----
> (define (stretch-levels 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)))
>                   (drawable (car (gimp-image-get-active-layer image))))
>              (gimp-levels-stretch RUN-NONINTERACTIVE
> 				  image drawable)

If you look more closely at the Procedure Browser, you will notice that
gimp-levels-stretch only takes a single parameter, not three.


Sven




More information about the Gimp-user mailing list