LinkedInTwitterFacebook

Gimp 2.8 – Script-Fu tutorial -part 001.

Working with Gimp Script Fu is not vrey hard.

I will use Gimp 2.8 to make this simple tutorial.

gimp-script-fu-001

It’s need to understanding how script fu working and what can do for you.

Most of the users think the working with gimp is just tools , layers , buttons and nothing else.

Now I will show you how can improuve your work with Gimp Script Fu.

To working with Script-Fu it’s need to go to menu: Filters – Script-Fu – Console

gimp-script-fu-002

First you need to know it’s the Script Fu has some sintax programming.

I will show some basic arithmetic operations like: addition, subtraction, multiplication and more…

Let’s see how to do that:

addition

subtraction

multiplication

division

When you need to use some vars then you can use this:

Let’s see the result :

gimp-script-fu-003

You can use also many functions like :

The ? is use to test if var1 is integer and result is #t (t from true).

Also we can define a var named word1 = “hello”.

The #f show us the result of (integer? word1) is false.

And if we need to create random values then is used random function.

Gimp also have many functions.You can see all if go to menu Help Procedure Browser.
gimp-script-fu-004

But this is theory so let make now something more advance.

Close the old console and open it again.

Make a file named Ex001.scm into your Gimp folder scripts ( C:\Program Files\GIMP 2\share\gimp\2.0\scripts\ ) and add this source script:

After restart your Gimp application the script can be found into Main Menu – File – Create:

The result when I run the Script-Fu script is this window dialog:

The output of this script with setting from free-tutorials ex.001 :

There are many web sites on the Internet with information relating to the Script-Fu scripts and plugins.
Is more good for you to learn the basic of Script-Fu – this help you to make your own area of work with graphics.
When you try someone else’s work most of the time you choose with errors or incomplete output.
Knowing how to create and program scripts Script Fu in the Gimp application can help you create both: the desired content and the assimilation of content taken from the internet.