[gimp] Fix bug 590418: make chalk script-fu work.
- From: Akkana Peck <akkana src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Fix bug 590418: make chalk script-fu work.
- Date: Tue, 2 Feb 2010 21:34:38 +0000 (UTC)
commit 36551daa19d770bc3dd2bc87455c5f01343dd2a5
Author: Akkana Peck <akkana git gnome org>
Date: Tue Feb 2 13:04:24 2010 -0800
Fix bug 590418: make chalk script-fu work.
Sobel doesn't work on layers with transparency, like text layers,
so the text layer in the chalk script needed to be merged with the
background layer beneath it.
plug-ins/script-fu/scripts/chalk.scm | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/chalk.scm b/plug-ins/script-fu/scripts/chalk.scm
index 0a8dbbe..6bd86f9 100644
--- a/plug-ins/script-fu/scripts/chalk.scm
+++ b/plug-ins/script-fu/scripts/chalk.scm
@@ -45,13 +45,19 @@
(plug-in-spread RUN-NONINTERACTIVE img logo-layer 5.0 5.0)
(plug-in-ripple RUN-NONINTERACTIVE img logo-layer 27 2 0 0 0 TRUE TRUE)
(plug-in-ripple RUN-NONINTERACTIVE img logo-layer 27 2 1 0 0 TRUE TRUE)
- (plug-in-sobel RUN-NONINTERACTIVE img logo-layer TRUE TRUE TRUE)
- (gimp-levels logo-layer 0 0 120 3.5 0 255)
- ; work-around for sobel edge detect screw-up (why does this happen?)
- ; the top line of the image has some garbage instead of the bgcolor
- (gimp-rect-select img 0 0 width 1 CHANNEL-OP-ADD FALSE 0)
- (gimp-edit-clear logo-layer)
+ ; sobel doesn't work on a layer with transparency, so merge layers:
+ (let ((logo-layer
+ (car (gimp-image-merge-down img logo-layer EXPAND-AS-NECESSARY))))
+ (plug-in-sobel RUN-NONINTERACTIVE img logo-layer TRUE TRUE TRUE)
+ (gimp-levels logo-layer 0 0 120 3.5 0 255)
+
+ ; work-around for sobel edge detect screw-up (why does this happen?)
+ ; the top line of the image has some garbage instead of the bgcolor
+ (gimp-rect-select img 0 0 width 1 CHANNEL-OP-ADD FALSE 0)
+ (gimp-edit-clear logo-layer)
+ )
+
(gimp-selection-none img)
(gimp-context-pop)
@@ -120,7 +126,7 @@
""
SF-STRING _"Text" "CHALK"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
- SF-FONT _"Font" "Cooper"
+ SF-FONT _"Font" "Sans"
SF-COLOR _"Background color" "black"
SF-COLOR _"Chalk color" "white"
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]