tags:

views:

55

answers:

2

Hi all,

is there any way to connect GIMP with python or PHP and use its libraries? It seems that all i can find on the web is pygimp which is not supported anymore.

ps. i do my development on mac and i use linux as a production server

A: 

Probably not directly, but I'll bet you can access some functions via 'exec()' on the command line. What are you trying to do? Can the GD or ImageMagic tools help?

Evan
Fotis
+2  A: 

You can write GIMP plugins in Python (see, for example James Hestenridge's clothify, then call the plug-in from the command-line with a command of the form

gimp -i -b '(python-fu-bw-film RUN-NONINTERACTIVE "/path/to/filename.jpg" 0 1 FALSE FALSE FALSE FALSE FALSE FALSE)' -b '(gimp-quit 0)'

It's not exactly pretty, but it's possible. Here is another example.

unutbu
Haven't tried this yet but thank you so much! I think it's enough to get my hand dirty
Fotis