Hello everybody,
I'm completely new to fu-scripting,
I have a problem using scrip-fu-distress-selection, it causes the following error :
(gimp:3091): Gimp-Core-CRITICAL **: gimp_image_set_active_channel: assertion `channel == NULL || gimp_container_have (image->channels, GIMP_OBJECT (channel))' failed
GIMP-Avertissement: Plug-In '(null)' left image undo in inconsistent state, closing open undo groups.
The script I made is very simple : select black color, feather the selection and distress it. It works well without the distress part.
Any suggestion that would help me out ?
[code]
(define (simple-unsharp-mask filename)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
(width (car (gimp-drawable-width image)))
(height (car (gimp-drawable-height image))))
(gimp-context-set-background '(98 123 0))
(gimp-context-set-foreground '(144 176 17))
(gimp-by-color-select drawable '(0 0 0) 0 2 1 0 0 1)
(gimp-selection-feather image 10)
(gimp-selection-sharpen image)
; (script-fu-distress-selection RUN-NONINTERACTIVE image drawable 127 1 1 1 1 1)
(gimp-edit-blend drawable 0 0 0 100 0 0 0 0 0 0 0 0 0 width height)
(gimp-selection-invert image)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill drawable 1)
(gimp-file-save RUN-NONINTERACTIVE image drawable "/home/alexis/img2.jpg" filename)
(gimp-image-delete image)))
[/code]
Alexis.
NB : the script is used in terminal-mode, not as a gimp plugin.
Recent comments