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
2 answers

Dynamic image manipulation service

I need advise. I want to create web page, where users can upload their images, and on server side I want to put these images to prepared image template and show on page. Is it possible? Is it possible with GIMP scripting? Any ideas?
Makko
  • 460
  • 1
  • 6
  • 25
1
vote
1 answer

Python-fu script not showing in Gimp menu

I’ve been at Gimp: python script not showing in menu and it didn’t help me. Here’s what I tried, step by step: 1. I’m running Gimp 2.8.16 on Mac OS X 10.9.5 from the command line with gimp as my .bashrc file includes alias…
Júlio Reis
  • 173
  • 11
1
vote
2 answers

Gimpfu scripting: Why does layer's ID get corrupted?

I have been experimenting with GIMP(v2.8.10) layer's manipulation, programatically with custom gimpfu plug-ins. I successfully achieved to select, rotate, scale and translate dinamically a portion of the existing layer: Some of the code inside the…
SebasSBM
  • 860
  • 2
  • 8
  • 32
1
vote
1 answer

Where can I select my personal plugins in GIMP?

I have been trying to run these sample scripts (specially helloworld.py and pytemplate.py) to get the hang on using python code in GIMP. I'm specially interested in pytemplate.py which is intended to show how to do something over an existing image…
SebasSBM
  • 860
  • 2
  • 8
  • 32
1
vote
1 answer

How to pass the image path in GimpFU

How can I pass a parameter in GimpFU python? #!/usr/bin/env python from gimpfu import * import traceback import sys def upload_image(img, layer, dir): # Actual plug-in code will go here try: open('/tmp/upload.txt',…
Lucas
  • 3,376
  • 6
  • 31
  • 46
1
vote
1 answer

Blender: segmentation, fault core dumped?

Here is an add-on I'm trying to create: import bpy import os import sys import subprocess import time from threading import * class Repeat(Thread): def __init__(self,delay,function,*args,**kwargs): Thread.__init__(self) …
Antoni4040
  • 2,297
  • 11
  • 44
  • 56
1
vote
1 answer

Gimp: why can't I register this?

I'm writing an add-on for Blender to sync it with Gimp and this script should be able to start from within Gimp, but I can't register it... Why? blender_gimp_sync.py: # -*- coding: utf-8 -*- #!/usr/bin/env python from gimpfu import * def…
Antoni4040
  • 2,297
  • 11
  • 44
  • 56
0
votes
2 answers

How can I save a layered 16bit image with Gimp in Python?

I need to create an automation to join two images in a layered file (layered as in Photoshop layers) to further process the images through batching inside Photoshop. I've tried ImageMagick, psd_tools, PIL and some other things. Most of those create…
augustoL
  • 3
  • 3
0
votes
1 answer

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). But when calling them I receive very unhelpful…
0
votes
0 answers

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", 1, TRUE) I tried with different icc files,from…
randomname
  • 41
  • 4
0
votes
1 answer

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 browser in gimp but only found commands to change the…
chappe67
  • 101
0
votes
0 answers

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 640x360. from gimpfu import * def…
0
votes
2 answers

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, buttons=(gtk.STOCK_SAVE, …
noirhor
  • 3
  • 2
0
votes
1 answer

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 black. Specifically…
sprog
  • 40
  • 7
0
votes
1 answer

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): addround = "_round" scale_and_export(image, drawable, 192,…
JaRoMaster
  • 428
  • 1
  • 3
  • 26
1 2 3
8 9