01-29-2023, 10:57 AM
(01-29-2023, 06:54 AM)salamander017 Wrote: Hello all. I just got into gimp and also have very little knowledge in scripting.
I have 2 black and white files with little difference.
I want to compare them using gimp.
For the process, I import the 2 files in different layers.
Then, using color exchange, I change the black to blue in one layer.
Then change black to red in the other layer.
The blending for the second layer will be multiply.
My script below gets an error when setting the second layer active I think.
(define (script-fu-set-active-layers image layer)
(let* (
(layer-list (gimp-image-get-layers image))
(layer1 (car layer-list))
(layer2 (cadr layer-list))
)
(gimp-image-set-active-layer image layer1)
(plug-in-exchange RUN-NONINTERACTIVE image layer 0 0 0 255 0 0 0 0 0)
(gimp-image-set-active-layer image layer2)
(plug-in-exchange RUN-NONINTERACTIVE image layer 0 0 0 0 0 255 0 0 0)
)
(gimp-displays-flush)
)
Thank you very much.
It might help if you gave details of the error message.