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
22
votes
3 answers

Writing gimp plugins in python on windows- how do i debug? where is the output?

EDITED HEAVILY with some new information (and a bounty) I am trying to create a plug in in python for gimp. (on windows) this page http://gimpbook.com/scripting/notes.html suggests running it from the shell, or looking at ~/.xsession-errors neither…
vish
  • 1,046
  • 9
  • 26
14
votes
1 answer

Writing a GIMP python script

What I want to do is to open gimp from a python program (with subprocess.Popen, perhaps), and in the same time, gimp will start with a python script that will open an image and add a layer... Well, how can I achieve that(I wish GIMP had better…
Antoni4040
  • 2,297
  • 11
  • 44
  • 56
13
votes
3 answers

How do I output info to the console in a Gimp python script?

I've just started learning about Gimp scripting using Python, and was wondering, how do I output text to the console? I am using version 2.7.5 on Windows 7. I tried the print function, but it does not write anything to the python-fu console or the…
Aralox
  • 1,441
  • 1
  • 24
  • 44
13
votes
1 answer

How to use PyCharm for GIMP plugin development?

I need to develop a plugin for GIMP and would like to stay with PyCharm for Python editing, etc. FYI, I'm on Windows. After directing PyCharm to use the Python interpreter included with GIMP: I also added a path to gimpfu.py to get rid of the error…
martin's
  • 3,853
  • 6
  • 32
  • 58
11
votes
2 answers

How to run python scripts using gimpfu from command line?

I'm trying to use functions of gimp 2.8.22 to convert a pdf to jpeg and i want to do that with a python script using the gimpfu library from my windows cmd (i have installed python 3.6.1). Right now, i't trying to do that with an example…
flixe
  • 626
  • 1
  • 11
  • 36
11
votes
1 answer

Gimp: python script not showing in menu

I followed this tutorial and this is what I have come up so far: #!/usr/bin/python # -*- coding: utf-8 -*- #http://www.ibm.com/developerworks/library/os-autogimp/ from gimpfu import* def plugin_main(timg, tdrawable, maxh=540, maxw=800): …
kyng
  • 457
  • 1
  • 6
  • 13
8
votes
1 answer

Gimp: How can I get the coordinates of path tool points?

I am new to gimp python-fu programming I have spent my 4 days WITH NO LUCK to figure out which is the best appropriate functions to use in order to get the coordinates of drawn path and show the output on gtk message box like the following…
Mahdi Alkhatib
  • 1,954
  • 1
  • 29
  • 43
6
votes
1 answer

batch resize images with gimp

I want to resize every jpg in a directory. This is the gimp script I've found. Looks sensible to me. (define (batch-resize pattern) (let* ((filelist (cadr (file-glob pattern 1)))) (while (not (null? filelist)) (let*…
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
6
votes
1 answer

Python-fu/gimpfu parameters - What does "image" mean?

I've been trying to switch from script-fu to python-fu, and I can't figure out what I'm supposed to pass for the "image" parameter. In script-fu it was just an integer, but when I put the same integer into python-fu, it just says it's the wrong…
Zaay'd
  • 65
  • 1
  • 5
6
votes
2 answers

Installing PyGIMP on Windows

On the web, I can find various example on gimp scripting with python. http://www.jamesh.id.au/software/pygimp/ http://www.gimp.org/docs/python/pygimp.html We need to import the gimpfu module to get the examples to work. Where can we get the…
Speccy
  • 694
  • 8
  • 30
5
votes
3 answers

Export all SVG paths with Gimp Python plugin

I want to write a Gimp-Python plugin in order to export all SVG paths from the current image. This seems quite simple but I am stuck with pdb calls, I may not be calling procedures correctly so I need your help. Here is my code : #!/usr/bin/env…
Swe
  • 53
  • 1
  • 7
4
votes
2 answers

How do I change text in a python-fu gimp script without changing the font?

I have a master image which I edit in gimp to get the look and feel wanted. I then want to use a python script to produce a bunch of new images with the text (on several different layers) changed. I would like to leave the font, size, italicized or…
argentum2f
  • 4,842
  • 2
  • 25
  • 30
4
votes
0 answers

How does the undo stack work for gimpfu plugins?

I'm writing a python plugin for GIMP. The plugin manipulates the image but the undo stack does not actually undo anything my plugin did. How do I get undo to work in this context? For example, the following will set the first tile in an RGBA image…
Clay
  • 1,159
  • 1
  • 9
  • 20
4
votes
1 answer

Batch export all open windows in Gimp

I just manually edited 200+ .PDF files in gimp and I would like to batch export all of them at once (in .PDF) instead of exporting one by one. I have the plugin-registry installed, but I'm not sure if I can take advantage of it in this case. I think…
SpidrJeru
  • 119
  • 3
  • 13
4
votes
1 answer

How to combine several PNG images as layers in a single XCF image?

I have several PNG images, which I need to combine as individual layers in a new GIMP XCF image. I need to perform this task many times, so a script based solution would be best. So far i tried to play around with the batch mode of GIMP, but failed…
Andre
  • 427
  • 4
  • 17
1
2 3
8 9