[gimp/gimp-2-6] Fix bug 590418: make chalk script-fu work
- From: Akkana Peck <akkana src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-6] Fix bug 590418: make chalk script-fu work
- Date: Fri, 5 Feb 2010 03:24:17 +0000 (UTC)
commit 183e088a4bd25bc79e69f0ff4fa323cf5148e114
Author: Akkana Peck <akkana git gnome org>
Date: Thu Feb 4 19:22:14 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 08f999f..232f898 100644
--- a/plug-ins/script-fu/scripts/chalk.scm
+++ b/plug-ins/script-fu/scripts/chalk.scm
@@ -46,13 +46,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)
@@ -121,7 +127,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]