

The batch script (saved as batch.py): #!/usr/bin/python IMHO you should even avoid this, this unnecessarily pollutes Gimp's menus and procedure name space. To run a python script you don't need to have it register as a plugin. The script actually works when i run it from Gimp itself, but when i try to run it from my cmd, Gimp opens with another cmd saying: Error: ( : 1) eval: unbound variable: hello_world 'When run this plug-in prints "Hello, GIMP world!" in a dialog box.', 'A simple Python-Fu "Hello, World" plug-in', I left out the interface statement and I also tried out the most simple example to figure out whats wrong: #!/usr/bin/env python However, no matter what i do, i always geht the same error message: I try to run the script from my cmd like this: gimp-2.8 -no-interface -batch '(python_fu_hello_world RUN-NONINTERACTIVE "Hello" Arial 50 red)' -b '(gimp-quit 1)'

(PF_STRING, "string", "Text string", 'Hello, world!'), "", # Create a new image, don't work on an existing one "Create a new image with your text string", # Can't add this first because we don't know the size of the text layer.īackground = gimp.Layer(img, "Background", layer.width, layer.height, Img.resize(layer.width, layer.height, 0, 0) # Resize the image to the size of the layer Layer = pdb.gimp_text_fontname(img, None, 0, 0, initstr, 10, # Create a new text layer (-1 for the layer means create a new layer) # First do a quick sanity check on the font Right now, i't trying to do that with an example script: #!/usr/bin/env pythonĭef hello_world(initstr, font, size, color) :
#GIMP 2.8.22 SAVE AS JPEG PDF#
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).
