Questions tagged [script-fu]

Script-Fu is a version of Scheme embedded in The GIMP, used to automate image manipulation tasks.

Script-Fu is the embedded scripting language of the GIMP image editor. It is based off a dialect of Scheme called TinyScheme, which is nearly R5RS compatible; because of this, general language issues with Script-Fu could benefit from the larger audience of the tag. GIMP's documentation site has a section on scripting which deals with the Scheme language used by Script-Fu.

Script-Fu is intended for automating image manipulation; because of this, it also includes a large library of functions. Questions about the Script-Fu library should always be tagged .

In addition to the Script-Fu plugins provided by The GIMP itself, two repositories of scripts exists at The GIMP Plugin Registry, as well as at GIMP Scripts. In addition, the complete Script-Fu library is accessible through GIMP's Procedure Browser, which includes not only core functions built into GIMP but also functions belonging to any installed plugins.

152 questions
1
vote
1 answer

How set layer transparent fill on gimp image with script-fu / scheme

I'm trying to learn Scheme / Script-Fu for making some Gimp-Scripts. When I create a new layer on opened image, it adds a black background color, even though I call (gimp-drawable-fill layer TRANSPARENT-FILL) and add afterwards the new layer to the…
Jack O'Neill
  • 1,032
  • 2
  • 19
  • 34
1
vote
1 answer

Fix "Procedure execution of ... failed on invalid input arguments" error

I've been trying to write a script-fu script for GIMP 2.6+ that uses one of the built-in script-fu methods, namely the script-fu-add-bevel method. My problem is that whenever I call it, either in the console or in my script, I get: Error: Procedure…
Chase Sandmann
  • 4,795
  • 3
  • 30
  • 42
1
vote
1 answer

Can I create a script for GIMP to carry out a number of processes?

I want to process images before I send them to Tesseract for OCR. For example: Resize the image Change the resolution to 300 dpi Threshold (B&W image) Sharpen image How can I automate this process?
Nishant Roy
  • 1,043
  • 4
  • 16
  • 35
1
vote
2 answers

resize image using script-fu gimp

I'm trying to prepare a script for auto-resizing image files. I found this LINK but I cannot figure out how to use it. Anyone can provide a working script that I can use as a starting point?
Nicholas
  • 1,915
  • 31
  • 55
1
vote
1 answer

Nested while loop in Scheme with Gimp?

I'm writing a Gimp Script-Fu script, and trying to use a nested while loop. x is set to 15, y is set to 30. y loops up to 35, yet x stays at 15 and the loop quits. What is wrong here? Why is the value of x not changed? (while (< x 20) (while (< y…
noway
  • 2,585
  • 7
  • 41
  • 61
1
vote
2 answers

Batch rotate files with Gimp

I am using the following gimp script to rotate all images in a folder by 180° (the script is saved under ~/.gimp-2.8/scripts/batch-rotate.scm) (define (batch-rotate pattern rotate-type) (let* ((filelist (cadr (file-glob pattern 1)))) (while…
TheChymera
  • 17,004
  • 14
  • 56
  • 86
1
vote
1 answer

Can Gimp scripts/plugins add new layer modes?

The title pretty much says it. What I really want is a layer mode that takes the alpha channel of the one below it and in all other respects behaves the same. The general question seems worth asking. I'm skimming the docs, and it seems like layer…
Andrew Fleenor
  • 1,787
  • 2
  • 13
  • 12
1
vote
1 answer

GIMP Scriptfu how to make a script that takes two images as input?

I want to make a script-fu script that takes two images as input. How do I do this? Is there a file selector type? From the tutorial I know that I can do something like (script-fu-register "script-fu-text-box" …
George Mauer
  • 117,483
  • 131
  • 382
  • 612
1
vote
2 answers

Error in conditional (cond ...) script-fu

I'm trying to do a script-fu and I'm using a cond statement theoretically correct, but it always gives the error "Error: ( : 1) illegal function ". This is the code: (define (script-fu-prueba edicionInteractiva) (let* ( …
uSOf
  • 19
  • 2
1
vote
1 answer

is there a way in gimp to find points on the layer?

Suppose I have an image with several dots (as int the attached file). Is there a way for a script to find these dots and give me an array of them? I guess I can do this via image processing, but I was hoping that there was a script that will do…
Yotam
  • 10,295
  • 30
  • 88
  • 128
1
vote
1 answer

Creating a new image with scriptfu

I'm experimenting with script-fu, trying to teach myself how to use it. I have the following basic script, which I thought would create, then display, a new image: (define (script-fu-test) (let* ( (image (car (gimp-image-new 10 10…
blueberryfields
  • 45,910
  • 28
  • 89
  • 168
1
vote
1 answer

GIMP: Can not find a way to keep XCF structure while saving to PNG

On the GIMP interface one can 'Export to PNG' to save a PNG copy of your work, with layers correctly merged. In Script-Fu, however, if one does (let* ( ( theMergedLayer (car (gimp-image-merge-visible-layers theImage…
Envite
  • 321
  • 2
  • 6
  • 16
1
vote
1 answer

GIMP Script-fu changing default scripts

I am having issues re-writing one of the default logo scripts in GIMP(using Script-fu based on scheme). For one thing the alpha layer is not shown in the layer browser after the image is shown. I am re-writing the Create Neon Logo…
Josh Menzel
  • 2,300
  • 4
  • 22
  • 31
1
vote
2 answers

Using Gimp script in windows command line Error

I try using this script to convert .PSD with using a certain script. This is my code: @echo off set gimp="c:\Program Files\GIMP 2\bin\gimp-console-2.8.exe" %gimp% -i -b '(flatten-layer-groups 1 test.psd)' -b '(gimp-quit 0)' but he does not work,…
madflux
  • 11
  • 3
0
votes
0 answers

gimp brush folder error

Trying to paste into a new brush, I get the following error message: Error while executing script-fu-paste-as-brush: Error: Procedure execution of file-gbr-save failed: Could not open 'C:\Users\username/brushes/mybrush2.gbr' for writing: No such…
Erel Segal-Halevi
  • 33,955
  • 36
  • 114
  • 183