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
1
vote
1 answer

Within a gimp python-fu plug-in can one create/invoke a modal dialog (and/or register a procedure that is ONLY to be added as a temp procedure?)

I am trying to add a procedure to pop-up a modal dialog inside a plug-in. Its purpose is to query a response at designated steps within the control-flow of the plug-in (not just acquire parameters at its start). I have tried using gtk - I get a…
Chrys G
  • 99
  • 10
1
vote
1 answer

Errors when attempting to run Sphinx on some GIMP Python Plugin code

I am trying to use Sphinx to document a Python file, which is being used to implement a GIMP Plugin. The problem is, when I run; make html I get the following messages - which as can be seen below, yield an error; sphinx-build -b html -d…
user1094648
  • 141
  • 9
1
vote
0 answers

How to run cage transform in python fu

I'd like to run the cage tool/cage transform from a python script. The Python Procedure Browser can't find any entries while searching for "cage", "warp", "transform" and similar. Also dir(pdb) don't list procedures with cage inside the…
Vertex
  • 2,682
  • 3
  • 29
  • 43
1
vote
1 answer

python-fu gimp get items list

How can I get the list of items in an image using python-fu? I've tried searching for a similar function in Python Procedure Browser and google but I couldn't find any. (My end goal is to select a text item on a layer and convert it to a path) Edit…
Akash Agarwal
  • 2,326
  • 1
  • 27
  • 57
1
vote
1 answer

Batch save all opened files in GIMP .xcf

I have a series of manually edited images and layers in GIMP, each set is in a single tab. All want to save all of them into different .xcf's. I am aware of some scripts to export them as images (like this one), but I want to save them as .xcf, not…
pbruno
  • 147
  • 10
1
vote
2 answers

gimp python execution error

I spent awhile trying to get GIMP to register an example of the classic "hello world" plugin that I wrote to begin learning. Finally, I got it to register after double checking the file location and the path for plugins in GIMP's preferences as well…
Nap D. Lover
  • 125
  • 5
1
vote
0 answers

Gimp python-fu external editor importerror

I'm looking to build a script using Gimps build in Python extension. I have run into a problem though, and these are my symptoms, perhaps someone here is able to help me. When I run Python-fu from Gimp I get what you would expect, and a clear…
Nodine
  • 11
  • 3
1
vote
0 answers

High RAM usage of GIMP Python plugin when creating new images

I am trying to figure out why my GIMP plugin uses more and more RAM during it's execution. I wrote a simple test plugin to check if deleting images through pdb.gimp_image_delete works as intended: image_id = pdb.gimp_image_new(500, 500, RGB) while…
1
vote
1 answer

Python and Gimp: How to properly kill the gimp process?

I'm using a python script which is invoked by the photo software gimp to convert pdf to jpg. So far, the script works fine, but when it is finished, a cmd window is left open by gimp saying "press any key to exit". This cmd window is the gimp.exe…
flixe
  • 626
  • 1
  • 11
  • 36
1
vote
1 answer

Gimp, python-fu: Align layer with respect to background layer in image

The following code is used to align layer with respect to bottom background layer. import os from gimpfu import * import gimpfu import logging def scale(logo, tdrawable, imageName): logger = logging.getLogger() logger.info('got…
rok
  • 9,403
  • 17
  • 70
  • 126
1
vote
0 answers

GIMP Script-Fu: "Error: (: 1) car: argument 1 must be: pair"

I'm rather new at using GIMP's script-fu, and I'm working on a script to go through a full folder of .tif image files, resize them to having a dimension a maximum size of 1200 pixels while maintaining the proportions of the image. It then will save…
1
vote
1 answer

Access exif data from gimpfu plugin

I am trying to access an images exif data from inside a gimpfu plugin, specifically the date a photo was taken, I can do this with PIL, from PIL import Image date_taken = Image.open(file)._getexif()[36867] But when I try to import PIL, the plugin…
Kelly
  • 57
  • 6
1
vote
1 answer

Python-Fu fails on directory selection (PF_DIRNAME)

Using Python-Fu/gimpfu, I was able to register a plugin and run it from the Script-Fu console. But I could not run the plugin from the created GUI menu item. No matter which entry I selected from either directory drop-down menu, I would receive…
charego
  • 137
  • 9
1
vote
1 answer

Edit image files with Gimp script-fu

I'm trying to edit a pdf file with 100 pages, all of them images I need to export as png, setting their image mode as greyscale, and setting also their resolution, width and heigth. How can I write a scheme (or python) script that perform this…
nsm
  • 319
  • 1
  • 9
1
vote
2 answers

Python_fu plugin won't load in gimp

I am trying to write a gimp plugin using python_fu. I want it to take lots of identically sized layers and put them in a vertical line. This would be used for opening pdf files where each of the pages occupies one layer, and the plugin would put…
Melkor
  • 779
  • 1
  • 12
  • 29
1 2 3
8 9