Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Python Gimp plugin failing to register - gimp_wire_read() error

I'm attempting to write a Python plugin for Gimp (2.10.38). Right now, it is absolutely barebones to just register the function and run main, but it is failing to register and show up in the program. #...
user2649681's user avatar
4 votes
0 answers
78 views

How to apply Gimp3 layer mask with Gegl 0.4? (or: How to use gegl:opacity?)

Problem Use Gegl to apply a layermask in Gimp2.99 Gimp project structure desired result UPDATE This is an aproximation towards the result I would like to get, but the problem is not solved, yet. I ...
thomsound's user avatar
0 votes
0 answers
20 views

How do Batch export with Gimp Script-fu? (win11)

I was making some textures for minecraft (1.8.9) and I wanted to export them. I don't want to export one by one (it's 113 images or so) and I can't seem to find the script-fu code to make it work. It'...
Harald's World's user avatar
0 votes
0 answers
63 views

How to change the 'color temperature' in script-fu/scheme?

devs I'm working over a C# project and I execute gimp-console.exe to execute scripts and I put some paths (the input and the output image) as parameters to process some functions to this images. ...
Nauhl Valdez's user avatar
0 votes
1 answer
169 views

How to properly use file_raw_save via Python (GIMP PDB Procedure)

While writing a GIMP 2.0 plugin via Python and gimpfu, I've run into pdb procedures such as file_raw_save(...). There arguments are laid out in the GIMP Procedure Browser (Help->Procedure Browser). ...
Michael Buerger's user avatar
1 vote
0 answers
67 views

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 ...
DhiwaTdG's user avatar
  • 788
1 vote
0 answers
232 views

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 ...
Leonide's user avatar
  • 245
1 vote
1 answer
138 views

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 ...
Joko's user avatar
  • 13
0 votes
0 answers
65 views

Gimp gimp_image_convert_color_profile_from_file does not work

I'm trying to automate some task with gimp but it seems so that the color profile converting does not work. pdb.gimp_image_convert_color_profile_from_file(image, r"d:\Todelete\Input\eciRGB v2.icc&...
randomname's user avatar
0 votes
1 answer
112 views

Is there a way to make text italic with Python-Fu for GIMP?

My script changes text in a text layer, but doing that changes the text from italic to normal text. Is there a way to not make it change; or to change it back afterwards? I looked in the command ...
chappe67's user avatar
  • 101
0 votes
0 answers
95 views

How do I get my plug-in to work with BIMP?

This plug-in works fine when I run it by itself, but when I add it as a procedure to Batch Image Manipulation Plugin (BIMP), it only outputs the image as 412x316 without the borders that I want at ...
CluelessDumbo's user avatar
1 vote
1 answer
909 views

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) (...
Lukas2002's user avatar
0 votes
1 answer
635 views

Create .tiff image with both transparency channel and alpha channel

By setting a .tiff file "tiff:alpha" tag to either unspecified or unassociated I can have photoshop display it's alpha channel as either a premultiplied transparency or a seperate alpha ...
ForsakenCreator's user avatar
0 votes
2 answers
336 views

GIMP python-fu, How to get the directory of the last saved image

I'm trying to create some GIMP plug-in and here I have gtk FileDialog: chooser = gtk.FileChooserDialog(title="Save as...", action=gtk.FILE_CHOOSER_ACTION_SAVE,...
noirhor's user avatar
0 votes
1 answer
869 views

How to programmatically set color in gimp (pythonfu)?

Using Python, I was able to add a floating text layer using text_layer = pdb.gimp_text_fontname(image, drawable, x, y, text, border, antialias, size, size_type, fontname) However, the text appears in ...
sprog's user avatar
  • 40
0 votes
1 answer
118 views

Gimp python: how to undo scaling

I wrote a GIMP plugin to save my image in different sizes: from gimpfu import * import os def execScale(image, drawable, toSave, isRound): addround = "" if(isRound): ...
JaRoMaster's user avatar
-1 votes
2 answers
5k views

How do I install Gimp-Python on windows?

I try to write a simple plugin with gimpfu in python and I tried following those instructions. 1.2. Installation Gimp-python consists of a Python module written in C and some native python support ...
JaRoMaster's user avatar
0 votes
1 answer
220 views

Gimp export batch with edit

I want to export a deck of cards. I want to programmatically update the Value text field [A,1,2,3....]. Is there a plugin that can do this? Or will I have to explore Gimp scripting? Any guidance would ...
Just_Alex's user avatar
  • 558
0 votes
1 answer
102 views

Creating an Gimp "debug" user profile for experiments and plugin-development

Is it possible to create an alternative User Profile folder (Windows c:\Users\{your_id}\AppData\Roaming\GIMP\2.10, Unix's ~/.config/GIMP/2.10, MacOS /Users/{your_id}/Library/Application Support/GIMP/2....
Henrik Jensen's user avatar
0 votes
0 answers
390 views

How to create a layered PSD file from using Gimp command line?

I need to create a layered PSD file from a list of PNG images using the GIMP command line, in which each PNG image is one layer of a generated PSD file. I found one git related to this. It runs ...
Rupesh Chandgude's user avatar
0 votes
1 answer
249 views

Gimpfu Plugin is not starting

I am currently trying to write my own plugin for Gimp.It's my first time and also my first lines in python so be gentle with me. The code is used to make my live easier creating Liveries for DCS. For ...
David Bürgel's user avatar
0 votes
1 answer
2k views

GIMP pythonfu get drawable from current image

I am iterating over all open images. I want to apply threshold on each of them. Since the threshold plugin takes drawable as argument, the drawable should be changed every time the image is changed, ...
Masum's user avatar
  • 283
0 votes
1 answer
39 views

looking for syntax example of 'gimp.Channel(image,name,width,height,opacity,color)'

No problems with 'pdb.gimp_channel_new(image, width, height, name, opacity, color)' but I cannot get the syntax for 'gimp.Channel(image,name,width,height,opacity,color)' >>> image=gimp....
Kevin York's user avatar
1 vote
1 answer
171 views

How to change layer parent in python in Gimp?

Simple problem. I want to change the parent of LayerA to GroupB. The member "parent" of layer is read only, and I can't use pdb.gimp_image_insert_layer because the layer already has been ...
krokots's user avatar
  • 65
-1 votes
1 answer
330 views

Draw line in gimp with macro

I have calculated a set of lines to be drawn onto the image I calculated the geometry from. I was hoping for a macro recorder so I could just hack my geometry calculating program to spit out something ...
Mark Lester's user avatar
1 vote
1 answer
700 views

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 ...
Mitchell van Zuylen's user avatar
0 votes
1 answer
1k views

GIMP Script-Fu: batch edit images with a mask

I have thousand of images that i must removed nearly 1/2 the content from. Mannually i would: load image-a add alpha-channel import layer image-b (pre-made mask) make selection from masked out ...
tacticalteatime's user avatar
0 votes
1 answer
490 views

How do i rename a Layer using python-fu

I would like to rename the new layer which i just created. floating_sel = pdb.gimp_selection_float(drawable, 0, 0) pdb.gimp_floating_sel_to_layer(floating_sel) pdb.gimp_item_set_name(item, "s&...
Merlin Blatterer's user avatar
0 votes
1 answer
167 views

GIMP script can find custom palette when run in terminal but cant when inside a program

I want to execute gimp -if --batch-interpreter python-fu-eval -b 'import sys;sys.path=["."]+sys.path;import colorindex;colorindex.python_colorindex("gimptemp.jpg")' -b 'pdb....
Firebug's user avatar
0 votes
1 answer
361 views

Calling gimp_image_convert_indexed with a custom palette, palette cant be found

I am making a script to limit any image into 3 colors (to be used in a program to display to an e-ink display). I want to do this using GIMP's gimp_image_convert_indexed function bc Wand and PIP's ....
Firebug's user avatar
0 votes
1 answer
188 views

Gimp scriptfu procedure name of Colors->Map->Rotate Colors

The title basically says it all. I fail to find the script fu gimp procedure that acts like what you get in the Colors->Map->Rotate Colors menu. Besides, is there a general way to get the ...
Paolo.Bolzoni's user avatar
1 vote
1 answer
2k views

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 ...
onionknight's user avatar
0 votes
1 answer
2k views

In GIMP (DBP), how can I batch-resize photos to a certain width and keep aspect ratio?

I have been using GIMP to resize photos one by one, to say 800px-width while keeping aspect ratio. I downloaded the David Batch Processor plugin and everything looks fine, except it isn't able to ...
limestreetlab's user avatar
0 votes
1 answer
1k views

How to change text layer in GIMP?

I have a gimp file that I'm using as a template. I'm trying to find a way to script something so that I can easily replace the template text in that file to something that I specify. Cheers
Thibault Molleman's user avatar
3 votes
1 answer
4k views

Gimp python-fu script to select everything with a given color and change it to a different color

I am writing a plugin script that will open a file, select by color, change the selection to a new color, save image as a new file. I don't know how to change the color to a new color. Can someone ...
Walter Moore's user avatar
1 vote
1 answer
2k views

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 ...
Walter Moore's user avatar
0 votes
1 answer
143 views

In a gimp (pythonfu) plug-in, is there any way for the plugin itself to determine its installation path?

Suppose that a gimp (PyGIMP) plugin needs access to some arbitrary image files distributed with the plug-in. Given that the set can be installed by the user anywhere, is there a way for the plug-in ...
Chrys G's user avatar
  • 99
0 votes
1 answer
800 views

How do I rotate an image from a console using GIMP?

I am trying to run GIMP using console commands. All I want it to do is rotate an image 90 degrees. I added GIMP to my environmental variables so that I can call it from a console window. I also put ...
PetSven's user avatar
  • 362
0 votes
1 answer
281 views

Where can I find the GIMP Python Object References, I'm currently looking for the properties of Vectors and Points

I'm trying to write a script in GIMP Python and cannot seem to find any online docs regarding the GIMP Python Objects such as images, layers, paths, vectors, strokes, ect. I've looked around ...
T4roy's user avatar
  • 196
0 votes
2 answers
1k views

Trouble importing third party Python packages to GIMP 2.10 so that they can be used to write GIMP plugins

My goal is to import a couple third party Python packages for use with my GIMP installation. This will allow me to use these packages when developing a GIMP plugin. I noticed a few directories that ...
Psyntax's user avatar
  • 23
3 votes
1 answer
2k views

GIMP Python Plugin to load 2 images as layers

I'm trying to make a plugin for gimp that opens two images as separate layers and transforms one of them (more on that below). I'm using GIMP 2.10.12. I've been struggling to find a proper complete ...
Mate de Vita's user avatar
  • 1,325
1 vote
1 answer
619 views

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 ...
Chrys G's user avatar
  • 99
1 vote
1 answer
193 views

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, ...
user1094648's user avatar
0 votes
1 answer
242 views

Font size rendering is different depending upon login using Gimp?

I am using Gimp python-fu plugin. The plug-in written correctly renders a text block: (GIMP_UNIT_POINT = 3) titleBlockLayer = pdb.gimp_text_layer_new(img, title, <font_name>, 40, ...
Chrys G's user avatar
  • 99
1 vote
0 answers
147 views

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'...
Vertex's user avatar
  • 2,712
0 votes
1 answer
96 views

Is it possible to use win32com in python script for GIMP

I try to use win32com in GIMP python script. Script should appear under tab: /Grzegorz. I noticed that "IMPORT FROM EXCEL..." shortcut appears on tab only when I delete import declaration "import ...
Grzegorz's user avatar
0 votes
1 answer
151 views

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 )...
Jet Blue's user avatar
  • 5,271
2 votes
4 answers
4k views

gimp python - how to change pixel color?

I would like to load 2 jpg images with Gimp Python. Then the pictures should be compared pixel by pixel. If the pixel in picture 2 has a certain rgb value, the pixel in picture 1 should be colored. ...
Chris 's user avatar
  • 75
2 votes
1 answer
1k views

GIMP Python - Fill Path/Vector with color

I am trying to develop a script that i can run on opened SVG files. I want to iterate over all paths and fill the path with an arbitrary color ( I will be replacing this part of the code later). The ...
bpilling's user avatar
  • 192
1 vote
1 answer
2k views

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 ...
Akash Agarwal's user avatar