Commit 6ebc2739 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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
parent ff63dc6b
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment