HOME | DD

Published: 2012-06-16 23:14:42 +0000 UTC; Views: 8260; Favourites: 19; Downloads: 891
Redirect to original
Description
This GIMP script generates random splatter brushes by automating the process described in my Splatter Brush Tutorial [link]I'm currently in the process of creating a small series of GIMP scripting tutorials, in which I will be showing how to create this script.
Part 1: [link]
Part 2: [link]
Part 3: [link]
Part 4: [link]
INSTALLATION: Just download the zip file, extract the Splatter.scm file, and move it to your GIMP scripts folder, which should be something like (in Windows) C:\Users\username\.gimp-2.8\scripts. Then restart GIMP or refresh your scripts (Filters>Script-Fu>Refresh Scripts).
After that, the script should be accessible through File>Create>Splatter Brush. The user has the ability to set 3 parameters: (1) the "Brush Size" determines the dimensions of the square canvas, (2) the "Splatter Amount" determines how many strokes of the Sparks brush are used to generate the splatters, and (3) the "Splatter Thickness" controls the low threshold value of the Threshold tool, which determines (to some extent) the thickness of the splatters.
RECOMMENDATION: Try increasing the Sparks brush's "Spacing" in the Brushes dialog prior to running the script. This will help the splatters appear more random, but you may need to increase the Splatter Amount to compensate. I would add a "Spacing" parameter to the script if I could, but it currently seems to be impossible to change the spacing of one of GIMP's default brushes via script-fu.
BONUS: The Splatter.scm file includes a second script called "Smooth Threshold" which is used by the Splatter Brush script. It applies the Threshold tool followed by the "blur+levels" trick to smooth out the pixelated edges. You can try using it on other images by going to Colors>Smooth Threshold.
---------------------------------------------------------
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Related content
Comments: 8
catafest [2013-07-21 18:30:00 +0000 UTC]
can help me with this : stackoverflow.com/questions/17... (i use gimp 2.8) . Thank you.
👍: 0 ⏩: 1
monsoonami In reply to catafest [2013-08-06 17:12:44 +0000 UTC]
Okay, I posted an answer there that I think should fix the problem. Feel free to post another reply here if you're still stuck.
👍: 0 ⏩: 1
catafest In reply to monsoonami [2013-08-09 22:25:55 +0000 UTC]
The GIMP Message told me : script-fu-cut-height.scm : 28) script-fu-register: argument types must be integer values .
This is the source code of script-fu-cut-height.scm :
define (script-fu-cut-height filename outputfilename myheight) 👍: 0 ⏩: 1
(let* (
(img (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(imagewidth (car (gimp-image-width img)))
(imageheight (car (gimp-image-height img)))
(width (- imagewidth (+ right left)))
(height (- myheight (+ top bottom)))
)
(gimp-image-crop img width height left top)
(gimp-png-save RUN-NONINTERACTIVE
img
(car (gimp-image-active-drawable img))
outputfilename
outputfilename)
(gimp-image-delete img)
))
(script-fu-register "script-fu-cut-height"
"
"www.free-tutorials.org : script-fu"
"Cut an image by height and let width default"
"admin"
"www.free-tutorials.org"
"Jul 2013"
"RGB*, GRAY*"
SF-STRING "Filename" " "
SF-STRING "OutputFilename" " "
SF-VALUE "myheight" "0")
monsoonami In reply to catafest [2013-08-13 14:33:58 +0000 UTC]
I think the SF-VALUE needs to be a number, not a string, so remove the quotes around 0 in the last line:
SF-VALUE "myheight" 0)
👍: 0 ⏩: 1
catafest In reply to monsoonami [2013-08-29 07:12:09 +0000 UTC]
no ... gimp gui told me : Error while loading /home/usertest/cut-height.scm:
Error: (/home/usertest/cut-height.scm : 1) eval: unbound variable: define
👍: 0 ⏩: 1
monsoonami In reply to catafest [2013-08-30 18:53:38 +0000 UTC]
Ah, I just notice you're missing an opening parenthesis "(" before "define" on the first line:
(define (script-fu-cut-height ...
👍: 0 ⏩: 1
catafest In reply to monsoonami [2015-05-16 14:02:11 +0000 UTC]
Thank's . Now I try to save all working gimp tabs into png format.
👍: 0 ⏩: 0