Last active
September 22, 2020 15:28
-
-
Save smailliwcs/1ee8ee081732a7b3f11e0c1666db50c7 to your computer and use it in GitHub Desktop.
GIMP script: script-fu-highlight
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (script-fu-highlight image | |
drawable | |
padding | |
shadow) | |
(if (= (car (gimp-selection-is-empty image)) TRUE) | |
(gimp-message "Select an area to highlight.") | |
(let ((selection 0)) | |
(gimp-undo-push-group-start image) | |
(set! selection (car (gimp-selection-save image))) | |
(gimp-selection-grow image (/ padding 2)) | |
(gimp-selection-feather image padding) | |
(gimp-selection-invert image) | |
(gimp-levels drawable HISTOGRAM-VALUE 0 255 1 0 shadow) | |
(gimp-image-select-item image CHANNEL-OP-REPLACE selection) | |
(gimp-image-remove-channel image selection) | |
(gimp-undo-push-group-end image) | |
(gimp-displays-flush)))) | |
(script-fu-register "script-fu-highlight" | |
"_Highlight..." | |
"Highlight the current selection" | |
"Steven Williams" | |
"Steven Williams" | |
"2014" | |
"RGB* GRAY*" | |
SF-IMAGE "Image" 0 | |
SF-DRAWABLE "Layer" 0 | |
SF-ADJUSTMENT "Padding" '(10 0 100 1 10 0 SF-SPINNER) | |
SF-ADJUSTMENT "Shadow" '(127 0 255 1 10 0 SF-SLIDER)) | |
(script-fu-menu-register "script-fu-highlight" "<Image>/Filters/Light and Shadow/Light") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment