08-10-2025, 08:18 PM
I am trying to call a gegl edge detect filter repeatedly in a while loop as here
it works but only on the first image in the batch. Is there something I need to do to get it to work on all the images?
Code:
(while (not (null? filepaths))
;some stuff
(gimp-drawable-merge-new-filter
2 ; The drawable to apply the filter to
"gegl:edge" ; The name of the GEGL operation
0 ; The merge-mode (0 for normal)
LAYER-MODE-REPLACE ; The layer mode (e.g., replace, normal, etc.)
100.0 ; The opacity (0.0 to 100.0)
"amount" 2.0 ; Parameter: amount of edge detection
"border-behavior" "none" ; Parameter: how to handle image borders
"algorithm" "sobel" ; Parameter: the edge detection algorithm
)
;some more stuff
)