Questions tagged [gimpfu]

gimpfu is a python module similar to python-fu which provides an interface for writing plug-ins for gimp in python

For more information refer to the Gimp Python Documentation

121 questions
2
votes
1 answer

Closing a GIMP image from Python script/plugin

I have just written my first GIMP plug-in, and it generates a potentially large number of open images (iterating through loop, creating & saving images each time). When I call gimp.image_list() from the Python console I see all of them still open,…
jacobq
  • 11,209
  • 4
  • 40
  • 71
2
votes
0 answers

export all open file from gimp with scm script

I want to export all open file from gimp into png format, but I got errors about file : unbound variable: filename This is the script : (define (script-fu-save-all-images) (let* ((i (car (gimp-image-list))) (image)) (while (> i 0) (set!…
2
votes
1 answer

How to create my own prefix for my plugins?

Gimp says this when it fails to install my python plug-in: Querying plug-in: '/home/jorge/.gimp-2.8/plug-ins/enumerategrid.py' GIMP-Error: Plug-In "enumerategrid.py" (/home/jorge/.gimp-2.8/plug-ins/enumerategrid.py) attempted to install procedure…
shackra
  • 277
  • 3
  • 16
  • 56
2
votes
1 answer

GIMP Python No matter what format I use I always get "unable to parse color name"

I am trying to pass colors from these constants to to the Set fontcolor function below but everytime I do I get "unable to parse color name" unless I pass it directly from a GIMP Dialog. I even logged the variables being passed in directly, the…
rtsnhth
  • 87
  • 1
  • 11
2
votes
1 answer

Gimp, Script-Fu: How can I set a value in the colormap directly

I have a Scriptfu script written in Python for Gimp which applies several steps on an existing image and converts it to an indexed image in the process. The lightest color in the resulting image is always nearly white; I want to set it to exactly…
Alfe
  • 56,346
  • 20
  • 107
  • 159
2
votes
4 answers

python can't import gimpfu

I'm trying to write a gimp script using pythonfu. However, when I try to run script locally, I get an error `--> ./vvv.py Traceback (most recent call last): File "./vvv.py", line 5, in from gimpfu import * ImportError: No module…
Yotam
  • 10,295
  • 30
  • 88
  • 128
2
votes
1 answer

Gimp Python in Batch mode

I am trying to execute a Python piece of code in batch mode to edit an existing Gimp file. Getting the following error batch command experienced an execution error: Error: ( : 1) eval: unbound variable: commmand-line-execution Here is the code I am…
raj_arni
  • 959
  • 2
  • 15
  • 29
2
votes
1 answer

Gimp python plugin

Today I wrote a short python script that should rename a list of layers of a gimp image to add some flags, which are used when the layers are part of an animation. The script is integrated into the Gimp menu and the information provided in the…
Phidelux
  • 2,043
  • 1
  • 32
  • 50
1
vote
0 answers

GIMP script-fu to ImageMagic conversion

I have written the following GIMP script-fu function to remove lens distortion from an image using the lens-distortion-plugin. I execute this script through a command line function from my main python script. Just wondering if there is an equivalent…
DhiwaTdG
  • 748
  • 1
  • 10
  • 26
1
vote
0 answers

GIMP: Permission Denied error when saving with file_png_save2, but not when saving through File->Export

I'm trying to write a script to automate some things for a project I'm working on, and one of the steps is saving a file as a png. I'm using file_png_save2. When running the script, it errors out with a "Permission Denied" message. However, I can…
Leonide
  • 235
  • 3
  • 11
1
vote
1 answer

Create white background with gimpfu

I want to create a white background in my gimpfu plugin. I found the option to fill a drawable by using pdb.gimp_drawable_fill(drawable, 2) but there I have to select a drawable and the drawable fills not automatically the whole image. Is there an…
Joko
  • 13
  • 2
1
vote
1 answer

How can I export an image with Script-Fu to the folder with the GIMP file?

My Script works, but the exported file will be saved in my user folder. How can I automatically export the .png to the folder with my GIMP file? (define (script-fu-biz-scale Image Layer Drawable) (gimp-layer-sca080le Layer 1920 1 TRUE) …
Lukas2002
  • 11
  • 3
1
vote
1 answer

Adding two images togheter using "addition" blending mode: recreating GIMP "addition" mode in python gives different results

I am trying to add two images together. When I do so in GIMP, using the 'Addition' layer-mode I get the following desired output. Now, I am trying to execute this in Python, however I can not manage to get it working properly. According to the…
Mitchell van Zuylen
  • 3,905
  • 4
  • 27
  • 64
1
vote
1 answer

GIMP Python-Fu plugin will not register if some pdb methods are called

I'm trying to do some batch processing with Python-fu and just can't get my script to work. When I try to call some methods in pdb, such as pdb.plug_in_nlfilt(), the plug in won't register. I'm building off the test_batch_invert.py example here.…
1
vote
1 answer

Gimp Python script not showing in menu

I am trying to write a python-fu script to simply print a warning to the error console. I have this same thing working fine with schema-fu. But its not showing on the menu with python-fu. I have the script in the directory configured within gimp…
Walter Moore
  • 77
  • 2
  • 9
1 2
3
8 9