(define (script-fu-cadre1 image drawable) (let* ( (owidth (car (gimp-image-width image))) (oheight (car (gimp-image-height image))) (width (if (>= owidth oheight) 760 (trunc (* 760 (/ owidth oheight))))) (height (if (>= owidth oheight) (trunc (/ 760 (/ owidth oheight))) 760)) ) (gimp-image-undo-group-start image) (gimp-image-scale image width height) ; scale image (plug-in-unsharp-mask TRUE image drawable 2 0.2 20) ; unsharp mask radius 2 amount 20% threshold 20 (script-fu-addborder image drawable 5 5 '(0 0 0) 1) ; add 5 pixels black border (script-fu-addborder image drawable 1 1 '(255 255 255) 1) ; add 1 pixels white border (script-fu-addborder image drawable 14 14 '(0 0 0) 1) ; add 15 pixels black border (gimp-image-flatten image) (gimp-image-undo-group-end image) (gimp-displays-flush) )) (script-fu-register "script-fu-cadre1" "/Script-Fu/Cadres/B&W" "Add 5 pixels White and 15 pixels Black borders" "Son" "Son" "$Date: 2005/04/04 19:28:00 $" "RGB GRAY" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 )