Post Reply 

script-fu select from path, gaussian blur, remove active path

Sep 17, 2012, 14:54 (This post was last modified: Sep 17, 2012 15:44 by mark.)
Post: #1
script-fu select from path, gaussian blur, remove active path

I'm looking / wanting to create a script that will "Blur" out number/license plates. e.g.

1. I'll manually open the image
2. Use the "path tool" to select the area around the writing manually

Then use script-fu to "automate" the below steps.

1. Select -> From Path
2. Filters -> Blur -> Gaussian Blur >
Horiz = 55.0
Vert = 55.0
Blur Method = RLE
3. Select -> None
4. Delete Path

I've been attempting use the "Script-fu Console" and also "Gimpscripter plugin" - I have attached a copy of the script created by "Gimpscripter Plugin" (which gives an error) but cannot get off of first base!

I'm looking at the command (gimp-image-select-item image operation item) for "Select -> From Path" but cannot find any simple example for a "newbie" to this!

Thanks In Advance.

Attached File(s)
.txt  plugin-wrapper-BlurReg.txt (Size: 11.53 KB / Downloads: 237)
Find all posts by this user
Quote this message in a reply
Sep 17, 2012, 21:58
Post: #2
RE: script-fu select from path, gaussian blur, remove active path
thank you for your reply.. once i had got to grips with the paths tool I seem to have forgot all about the lasso tool.

With using the lasso tool, and a quick play around with Gimpscripter plug-in to apply Pixelize then select none ~ I can "blur" out number plates quickly now!

Again thank you so much for taking the time to reply to my post Smile

PS. will have to look into script tutorials more to get the hang of scripting!

(I have a attached the script, maybe it will be of use to someone. For win7. script goes in C:\Users\<user name>\.gimp-2.8\plug-ins\. rename file back to .py instead of .txt)

Attached File(s)
.txt  plugin-wrapper-WipeReg.txt (Size: 11.28 KB / Downloads: 225)
Find all posts by this user
Quote this message in a reply
Sep 18, 2012, 06:47
Post: #3
RE: script-fu select from path, gaussian blur, remove active path
(Sep 17, 2012 23:42)ofnuts Wrote:  284 lines of code for that? Your whole script is actually down to:

(also, adding items to the Image menu bar ("<Image>/Shortcuts") is considered bad form).

as i said above, i used Gimpscripter plug-in (
) to create the code. I didn't write it, or currently have the knowledge to write it. From my first impressions of using scripting in GIMP.. i'm not liking it, its not user friendly and very limited in working examples of code, hence my initial post here.

(Sep 17, 2012 23:42)ofnuts Wrote:  And, considering that 1) you don't really need to remove the selection once it has run and 2) you can rerun the script with the same parameters using Ctrl-F on all open images, you just need to input the parameters to Blur/Pixelize once, calling your script instead of hitting Ctrl-F has little benefit after the first plate...

1) I needed to remove the selection, as there is more that one number plate in the image, and I didnt want multiple area's selected at the same time.

2) when using multi images e.g. i do hundreds of these. The tool settings resets every time I exit and go back to GIMP. so the CRTL-F repeat action won't work until I have set the tool up again.

(Sep 17, 2012 23:42)ofnuts Wrote:  If only it had an ounce of built-in intelligence (such as self adapting to the plate size)...
Yes I totally agree, but I don't have a clue how to use command you suggested yet. I may look into it in the future, but currently I only interested in a quick solution (the above code was done in less than 1min) to blur out plates.

As stated by many GIMP users, this is where GIMP falls down against other graphic apps. It needs a marco recorder, and at the moment Gimpscripter was the solution for me.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Request for script chlebna 1 299 Sep 13, 2017 09:35
Last Post: ythgilb
  Request for script - Guillotine + Watermark sunslick 1 378 Sep 4, 2017 08:51
Last Post: ythgilb
  Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer Bertholom√§us 1 415 Aug 31, 2017 14:32
Last Post: Bertholomäus
  How to modify this script-fu? Zakary81 1 333 Aug 23, 2017 12:48
Last Post: paynekj
  Need help in running a gui script-fu via command line eyalzek 1 463 Oct 4, 2014 14:05
Last Post: eyalzek

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS