GIMP enables you to make plugin in in Python, what I would like to do is to call GIMP function like I would do inside one of this plugin but this return the following error since GIMP doesn’t find any running GIMP Core to use.
LibGimpBase-ERROR **: gimp_wire_write_msg: the wire protocol has not been initialized aborting...
I would like to know if it’s possible ? And if yes, how ?
Thanks
GIMP’s Python extensions need to be run from inside a GIMP instance. If you want to use GIMPś API from Python you have to run a GIMP without a graphical UI (passing the
-iparameter from the command line) and running a custom call to the api – with the-bcommand line parameter – so, you can run your python_fu_do_it program, from the command line calling:Note that this is the only way to get gimp-python extensions running: you have to run it from inside a GIMP process.
In real life, a useful thing to do might be to make your gimp-plugin expose some functions that perform actions on images that you want, and export those through an xmlrpc or jsonrpc server – which is easily done in Python. You then start this “image server” using the method above, and create stand-alone python script which call your gimp-using functions through xmlrpc.