; FU_artist_color-pencil.scm ; version 2.7 [gimphelp.org] ; last modified/tested by Paul Sherman ; 05/05/2012 on GIMP-2.8 ; ; ------------------------------------------------------------------ ; Original information --------------------------------------------- ; ; Color pencil image script for GIMP 2.2 ; Copyright (C) 2007 Eddy Verlinden ; ; End original information ------------------------------------------ ;-------------------------------------------------------------------- (define (FU-color-pencil img drawable ) (gimp-image-undo-group-start img) (let* ( (width (car (gimp-drawable-width drawable))) (height (car (gimp-drawable-height drawable))) (old-selection (car (gimp-selection-save img))) (image-type (car (gimp-image-base-type img))) (layer-type (car (gimp-drawable-type drawable))) (layer-temp1 (car (gimp-layer-new img width height layer-type "temp1" 100 NORMAL-MODE))) ) (if (eqv? (car (gimp-selection-is-empty img)) TRUE) (gimp-drawable-fill old-selection WHITE-IMAGE-FILL)) ; so Empty and All are the same. (gimp-selection-none img) (gimp-drawable-fill layer-temp1 TRANS-IMAGE-FILL) (gimp-image-insert-layer img layer-temp1 0 -1) (gimp-layer-add-alpha layer-temp1) (gimp-edit-copy drawable) (gimp-floating-sel-anchor (car (gimp-edit-paste layer-temp1 0))) (plug-in-gimpressionist 1 img layer-temp1 "ev_coloredpencil.txt") (gimp-hue-saturation layer-temp1 0 0 0 60) (gimp-image-select-item img CHANNEL-OP-REPLACE old-selection) (gimp-selection-invert img) (if (eqv? (car (gimp-selection-is-empty img)) FALSE) ; both Empty and All are denied (begin (gimp-edit-clear layer-temp1) )) (gimp-item-set-name layer-temp1 "Col Pencil") (gimp-image-select-item img CHANNEL-OP-REPLACE old-selection) (gimp-image-remove-channel img old-selection) (gimp-image-undo-group-end img) (gimp-displays-flush) ) ) (script-fu-register "FU-color-pencil" "/Script-Fu/Artist/Color Pencil" "Creates a drawing effect like made with colored pencils" "Eddy Verlinden " "Eddy Verlinden" "2007, juli" "RGB* GRAY*" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 )