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
0
votes
1 answer

Error in first argument GIMP batch threshold in WSL

I am having trouble using the GIMP batch commands in WSL. I have a file with several .png files and I am trying to apply threshold on all of them using the gimp batch, the documentation in gimp says how to run the commands, yet I get errors when I…
0
votes
1 answer

How can I find selection clusters in GIMP?

I am using Gimp 2.8.18. I have an image containing a very large map with tiny street names. When printed on paper the street names become unreadable because they are too small. I would like to enhance the image by enlarging the street…
Benjamin Bihler
  • 1,612
  • 11
  • 32
0
votes
1 answer

Problems with select by colour in GIMP

I'm having problems using pdb.gimp_by_color_select in Gimp I've already looked at this question Here's what I have: # duplicate layer duplicate_layer(image, "temp") tempLayer = pdb.gimp_image_get_active_layer(image) colour = (0,0,0) operation = 0…
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125
0
votes
0 answers

Script not using defined path

Sorry for any errors, english is not my native language I'm in need of a certain script to manipulate a bunch of images, to not bother people to death by asking "can someone do this for me?", i'm trying to learn how to write them myself. I start by…
0
votes
1 answer

What does the 'gimp_histogram' procedure require to work?

I do not understand why my call to pdb.gimp_histogram throws a RuntimeError: execution error. from gimpfu import * def plugin_main ( timg, tdrawable ): pdb.gimp_histogram( tdrawable, 0, 0, 255 ) According to the docs, the function takes four…
Jet Blue
  • 5,109
  • 7
  • 36
  • 48
0
votes
1 answer

Gimp - Script-Fu: insert from cache to new layer, inserted in layer map

I want to insert the current image in the cache to my current gimp project. You can easily do this by ctrl+v, but then the new layer is floating. When you create a new layer out of it, it will be the first layer and I have to drag it to the right…
mschmidt
  • 5
  • 2
0
votes
1 answer

Gaussian blur script in GIMP

I am new to GIMP and scripting. I would like to know how to apply Gaussian blur for a layer using script. I could not find any simple example describing my requirement. I am using GIMP version 2.10.4. Please let me know how to apply Gaussian blur…
0
votes
1 answer

Can't figure how to set two variables in a single IF statement

I'm trying to write my first Gimp script, but I can't seem to get it set two variables in a single IF statement : (if (< a b) ((set! a 100)(set! b 200)) ((set! a 200)(set! b 100)) ) I get an illegal function error. It works if I set a single…
Skippy le Grand Gourou
  • 6,976
  • 4
  • 60
  • 76
0
votes
1 answer

Q: Exporting GIMP script after editing a photo?

I'm wondering if it is possible to interactively edit a photo in GIMP and then export a script to programmatically transform a series of images in the same way? Chris
Chris
  • 3,109
  • 7
  • 29
  • 39
0
votes
1 answer

GIMP Script-fu/Python-fu: apply filter or color to all layers?

Okay, I'm fairly new to GIMP scripts/plug-ins and stackoverflow so I apologize in advance for any blunders I'm prone to make. Anyway, I have Windows 8, GIMP 2.8.22, GAP, and animstacks all for the purpose of making high quality gifs. Recently I…
0
votes
1 answer

Gimp python-fu: selecting two layers

I would like to create a python-fu script for gimp where the user could select two layers. register( (....) [ (PF_IMAGE, "image", "Input image", None), (PF_DRAWABLE, "layermask", "MASK:", None), (PF_LAYER, "drawinglayer", "DRAWING:",…
Pierre
  • 34,472
  • 31
  • 113
  • 192
0
votes
1 answer

Scheme - Simple list with three random elements

I haven't even seen Scheme before today, but need it to write a simple script for GIMP. Basically I'm in need of a list with three random elements from 0 to 255. I then give this list to a function that sets the foreground colour in gimp. I've…
Mateusz J
  • 45
  • 1
  • 4
0
votes
1 answer

script-fu - paste a layer in an alpha mask

I'm looking for a procedure to make the same thing I usually do manually in Gimp: Copy a layer Select alpha mask of another layer Paste I've already made great researches in the Procedure Browser but I couldn't find anything.
Thomas Arbona
  • 976
  • 5
  • 11
0
votes
0 answers

Gimp script-fu working only sometimes

I'm not really one of the graphic savvy people so I kinda hit a wall with this script found on the interwebz ( define (script-fu-pcb-filter img) (gimp-image-convert-grayscale img) (gimp-image-flip img 1) (gimp-image-resize img (* (cadr (cddr…
0
votes
2 answers

Scale image layer uniformly using python-fu in Gimp

My goal is scaling an image using python-fu library for gimp in a uniform way. It means specifying width/height should be enough for scaling. Gimp should change height/width accordingly. In Gimp GUI it's set with the marked toggle: I'm using the…
rok
  • 9,403
  • 17
  • 70
  • 126