I have it down to the following (although I'd still love an autolevels ;-), is there any way to pass a list to gimp-image-delete, because I've tried several things and I always get invalid argument. I tried:

(g-i-d new-image-rgb)
(g-i-d (new-image-rgb))
(g-i-d '(new-image-rgb))

Must be something I am misunderstanding about lists. Basically trying to slim the three g-i-d's down to one statement. But I did reduce the decompose to one statement with lists (I suspect it's much faster now but I haven't really timed it) and removed some cruft from the script I started from that I didn't need..

(define (script-fu-irchannelswap inImage inLayer)

(set! new-image-rgb (plug-in-decompose 1 inImage inLayer "RGB"))
(set! new-image-bgr (car (plug-in-compose 1 (caddr new-image-rgb) inLayer (cadr new-image-rgb) (car new-image-rgb) (car new-image-rgb) "RGB")))
(gimp-display-new new-image-bgr)
(gimp-image-delete (car new-image-rgb))
(gimp-image-delete (cadr new-image-rgb))
(gimp-image-delete (caddr new-image-rgb))
(gimp-image-set-filename new-image-bgr (car (gimp-image-get-filename inImage))) )
(gimp-displays-flush)


(script-fu-register "script-fu-irchannelswap"
"<Image>/Script-Fu/Enhance/IR Channel Swap" "Channel Swap"
"Walter Francis" "copyright 2003, Walter Francis"
"2003-08-30" ""
SF-IMAGE "The Image" 0 SF-DRAWABLE "The Layer" 0 )


-- Walter Francis http://theblackmoor.net Powered by Red Hat Linux 9

_______________________________________________
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user

Reply via email to