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

Using gimp as server on windows

Here is my problem. CONTEXT I'm building a whole system to handle images processing in my company. We are processing .psd and .cr2 file making a whole lot of differents operations (like developping .cr2 file changing exposition building image…
florent
  • 29
  • 1
  • 3
  • 12
0
votes
2 answers

In Gimp script-fu, how can you access QuickMask functionality?

In the Gimp GUI, the QuickMask is very useful for many things, but this functionality doesn't seem to be directly available through script-fu. No obvious equivalents were apparent to me in the procedure browser. In particular, putting the…
mgkrebbs
  • 856
  • 15
  • 22
0
votes
1 answer

Is there a way to change the active tool assigned to a device using Script-Fu?

I want to create a toggle key to switch between two frequently used tools. I thought I could switch the active tool using "gimp-context-set-paint-method," but it seems that this only changes the active tool within the script and does not modify the…
tanaka
  • 3
  • 2
0
votes
1 answer

So weir in script-fu, cadr function not work

> (cadr '(1 2 3)) Error: eval: unbound variable: cadr I think who are familiar with script-fu should think as i am, this is so weir. Just few day ago, i ran some thing like "cadr" or even "caaadr" smoothly. Please help me. i search on google 10…
user21539529
0
votes
1 answer

How generate scriptfu scheme code in GIMP?

Gimp has script-fu for scripting code in Scheme. But i don't know does ít has the reverse function? It mean, when i draw or do something, can it generate scheme code or any language parallel with that action? I think that will be the best way to…
user21539529
0
votes
1 answer

Attempting to script the addition of a small logo on top of a QR code using GIMP and Script-Fu. Second image doesn't show

I'm looking to automate the addition of a small PNG at the centre of a much larger PNG using GIMP (2.8) and its Script-Fu language. The first image provided in the procedure call always shows, but the second image doesn't. (overlay-images…
Isaac
  • 11
  • 6
0
votes
1 answer

how to select and manipulate a portion of text inside a text layer using python-fu

I wrote a gimp python plugin to create an image, add a text layer, and write some text into it. Similar to this one. I want to apply a different formatting to a portion of this text but I can't find the function to do it when I browse Filters >…
delki8
  • 379
  • 4
  • 17
0
votes
2 answers

Gimp won't run on cloud run but works from local dockers image

As the title states, I'm trying to run gimp through a Node.js docker image. I have this working locally, however I get the following error trying to run gimp commands while it is being deployed on google cloud run: GIMP-Warning: The batch…
0
votes
1 answer

how would I turn a "magic-wand" selection into a path object in GIMP using batch scripting

As the title suggest, how would one perform this? Right now I have this plugin to add a basic path to an image, but how do I convert a selection from "gimp-image-select-contiguous-color" into "vectors"? #!/usr/bin/env python from gimpfu import pdb,…
ForsakenCreator
  • 83
  • 1
  • 12
0
votes
1 answer

Get error on 'gimp-image-set-active-layer' when trying to use script-fu-drop-shadow

I would like to add a drop shadow to picture files without using the Gimp UI. I've saved this content to ~~/.config/GIMP/2.10/scripts/my.scm~: (define (my/add-drop-shadow filename) (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename…
Damien Cassou
  • 2,555
  • 1
  • 16
  • 21
0
votes
1 answer

What is the error in this GIMP Script-fu code?

I'm new to Script-Fu and am trying to write a script which takes in a layer name and color and recolors all black pixels in that layer the specified color. My code is below. I register it using script-fu-register and calling it from within the…
listopad
  • 1
  • 1
0
votes
0 answers

How to auto close DarkTable when loading RAW files via Gimp script-fu?

If invoking Gimp script-fu from a batch file and passing a RAW file (.dng) as the input filename, DarkTable opens upon executing the command (gimp-file-load RUN-NONINTERACTIVE filename filename). The windows has to be closed interactivly for…
jamacoe
  • 519
  • 4
  • 16
0
votes
1 answer

Gimp 'gimp-image-convert-indexed' produces huge files

I am writing a script (my first script-fu) to export .jpeg to .avif and .webp, and I want to optimize the files for the web. Somewhere I read the suggestion to change from RGB to an indexed color palette, so I implemented the procedure…
jamacoe
  • 519
  • 4
  • 16
0
votes
1 answer

invoke GIMP script-fu from command line

I can't get any GIMP Fu script to work (using Gimp 2.10.32 (Revision 1) on Windows 10 Pro 21H2 19044.1826). Consider this minimal script. It is supposed to read a file and write it out again under a different name, without applying any…
jamacoe
  • 519
  • 4
  • 16
0
votes
1 answer

gimp python-fu resize text box

I have a simple python-fu script for gimp list_of_text = [ "long string one", "long string two ", ] x=200 y=400 border=0 font_size=62 font="Merriweather" path='/Users/incognito/blank_card.xcf' for text in list_of_text: image =…
Incognito
  • 20,537
  • 15
  • 80
  • 120