Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BIMP won't process my Script-fu script
#1
Perhaps it's a hint for me to try Python-fu. I've confirmed that the attached script works in Gimp 2.10.
The output of BIMP, though, is an unchanged image.
Am I missing something basic about BIMP?

(define (make-vignette color size opacity img)
 
  (let* ((width (car (gimp-image-width img)))
         (height (car (gimp-image-height img)))
;         (layer (car (gimp-layer-new img width height 0 "vignette" 100 NORMAL-MODE)))
         )

    (gimp-context-push)
    (gimp-image-undo-group-start img)

    (gimp-image-select-ellipse img 0 65 50 (/ width 1.3) (/ height 1.3))
    (gimp-selection-feather img size)
    (gimp-selection-invert img)
    ;(gimp-layer-set-opacity layer opacity)
    ;(gimp-layer-add-mask layer (car (gimp-layer-create-mask layer ADD-MASK-SELECTION)))
    ;(gimp-image-select-ellipse img 0 0 0 width height)
    ;(gimp-selection-clear img)
    ;(gimp-context-set-foreground '(0 255 0))
    (gimp-context-set-background color)
    ;(gimp-image-insert-layer img layer 0 -1)
    ;(gimp-drawable-edit-fill layer FILL-FOREGROUND)  
    (gimp-drawable-edit-fill img FILL-BACKGROUND)
    (gimp-selection-none img)
    (gimp-image-undo-group-end img)
    ;(gimp-displays-flush)

    (gimp-context-pop)
     
  )
)

(script-fu-register
  "make-vignette"
  "Colored Vignette"
  "Create colored vignette for the image"
  "Robert Knox"
  ""
  "April 2022"
  RGB
  SF-COLOR "Color" "#222255"
  SF-VALUE "Size" "300"
  SF-VALUE "Opacity" "100"
  SF-IMAGE "image" 0
)
(script-fu-menu-register "make-vignette" "<Image>/Filters/Light and Shadow")
Reply


Messages In This Thread
BIMP won't process my Script-fu script - by robknox - 04-19-2022, 01:02 AM

Forum Jump: