mirror of https://github.com/GNOME/gimp.git
applied patch from Saul Goode that enables Distress Selection for
2007-06-04 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/scripts/distress-selection.scm: applied patch from Saul Goode that enables Distress Selection for grayscale images. svn path=/trunk/; revision=22706
This commit is contained in:
parent
ff63dc6b44
commit
6ebc273959
|
@ -1,3 +1,8 @@
|
|||
2007-06-04 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/script-fu/scripts/distress-selection.scm: applied patch
|
||||
from Saul Goode that enables Distress Selection for grayscale images.
|
||||
|
||||
2007-06-04 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpcolorscale.c (gimp_color_scale_expose):
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
; Define the function:
|
||||
|
||||
(define (script-fu-distress-selection inImage
|
||||
inLayer
|
||||
inDrawable
|
||||
inThreshold
|
||||
inSpread
|
||||
inGranu
|
||||
|
@ -35,14 +35,18 @@
|
|||
(theWidth (car (gimp-image-width inImage)))
|
||||
(theHeight (car (gimp-image-height inImage)))
|
||||
(theLayer)
|
||||
(theMode (car (gimp-image-base-type inImage)))
|
||||
)
|
||||
|
||||
(gimp-image-undo-group-start theImage)
|
||||
|
||||
(if (= theMode GRAY)
|
||||
(set! theMode GRAYA-IMAGE)
|
||||
(set! theMode RGBA-IMAGE)
|
||||
)
|
||||
(set! theLayer (car (gimp-layer-new theImage
|
||||
theWidth
|
||||
theHeight
|
||||
RGBA-IMAGE
|
||||
theMode
|
||||
"Distress Scratch Layer"
|
||||
100
|
||||
NORMAL-MODE)))
|
||||
|
@ -79,7 +83,10 @@
|
|||
(plug-in-gauss-iir TRUE theImage theLayer 1 TRUE TRUE)
|
||||
(gimp-selection-layer-alpha theLayer)
|
||||
(gimp-image-remove-layer theImage theLayer)
|
||||
|
||||
(if (and (= (car (gimp-drawable-is-channel inDrawable)) TRUE)
|
||||
(= (car (gimp-drawable-is-layer-mask inDrawable)) FALSE))
|
||||
(gimp-image-set-active-channel theImage inDrawable)
|
||||
)
|
||||
(gimp-image-undo-group-end theImage)
|
||||
|
||||
(gimp-displays-flush)
|
||||
|
@ -93,7 +100,7 @@
|
|||
"Chris Gutteridge"
|
||||
"1998, Chris Gutteridge / ECS dept, University of Southampton, England."
|
||||
"23rd April 1998"
|
||||
"RGB*"
|
||||
"RGB*,GRAY*"
|
||||
SF-IMAGE "The image" 0
|
||||
SF-DRAWABLE "The layer" 0
|
||||
SF-ADJUSTMENT _"Threshold (bigger 1<-->255 smaller)" '(127 1 255 1 10 0 0)
|
||||
|
|
Loading…
Reference in New Issue