Re: [Gimp-user] Howto create images with gimp-python non-interactive
On Tue, Sep 20, 2005 at 11:03:55AM +0200, Martin Lesser wrote: Is it possible to create images with python-fu but without a GUI? I tried # PYTHONPATH=/usr/lib/gimp/2.0/python python from gimpfu import * img = gimp.Image(100, 100, RGB) but this results in a glib-error: LibGimpBase-ERROR **: could not find handler for message: 5 As you found out, this won't work. Python-Fu scripts can only be invoked from GIMP itself. How do I tell gimpfu to run in non-interactive mode from command-line or other scripts? Write your script like any other python-fu script, and stick it in the plug-ins directory: #!/usr/bin/env python from gimpfu import * def do_stuff(): img = gimp.Image(100, 100, RGB) print img register( python_fu_do_stuff, Stuff, Things!, Me!, Me!, 2005, Toolbox/Xtns/Python-Fu/Do Stuff, , [], [], do_stuff) main() Then invoke from the command line: $ gimp -i -b '(python-fu-do-stuff 1)' -b '(gimp-quit 0)' This will create an image and print gimp.Image 'Untitled' to the console if successful. -Yosh ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] Howto create images with gimp-python non-interactive
Is it possible to create images with python-fu but without a GUI? I tried # PYTHONPATH=/usr/lib/gimp/2.0/python python from gimpfu import * img = gimp.Image(100, 100, RGB) but this results in a glib-error: LibGimpBase-ERROR **: could not find handler for message: 5 How do I tell gimpfu to run in non-interactive mode from command-line or other scripts? TIA, Martin ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Howto create images with gimp-python non-interactive
On Tue, Sep 20, 2005 at 11:03:55AM +0200, Martin Lesser wrote: Is it possible to create images with python-fu but without a GUI? I tried # PYTHONPATH=/usr/lib/gimp/2.0/python python from gimpfu import * img = gimp.Image(100, 100, RGB) but this results in a glib-error: LibGimpBase-ERROR **: could not find handler for message: 5 How do I tell gimpfu to run in non-interactive mode from command-line or other scripts? I'm not sure what you're trying to achieve with GIMP, but maybe you want to use PIL? http://www.pythonware.com/products/pil/ Greetings, -- Roman Joost www: http://www.romanofski.de email: [EMAIL PROTECTED] pgpX3oi0zMFTG.pgp Description: PGP signature
Re: [Gimp-user] Howto create images with gimp-python non-interactive
Roman Joost [EMAIL PROTECTED] writes: On Tue, Sep 20, 2005 at 11:03:55AM +0200, Martin Lesser wrote: How do I tell gimpfu to run in non-interactive mode from command-line or other scripts? I'm not sure what you're trying to achieve with GIMP, but maybe you want to use PIL? PIL does not offer all functions I need. Saving animated gifs with many frames is also not optimal with the PIL-encoder cause each frame has to have the same size. So the idea is to access gimp-plugins from within python-scripts and finally create dynamicly generated animated gif-files. Greetings Martin -- http://bettercom.de/auctiontools/ ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] Howto create images with gimp-python non-interactive
On Tue, Sep 20, 2005 at 03:28:02PM +0200, Martin Lesser wrote: Roman Joost [EMAIL PROTECTED] writes: On Tue, Sep 20, 2005 at 11:03:55AM +0200, Martin Lesser wrote: How do I tell gimpfu to run in non-interactive mode from command-line or other scripts? I'm not sure what you're trying to achieve with GIMP, but maybe you want to use PIL? PIL does not offer all functions I need. Saving animated gifs with many frames is also not optimal with the PIL-encoder cause each frame has to have the same size. So the idea is to access gimp-plugins from within python-scripts and finally create dynamicly generated animated gif-files. my goal is to use gimp non-interactively like that on a script i am writing. i was going to use gimp-console. i think the quickest way to see if your gimp was built with this option is to type man gimp-console. if your gimp was built with this option then typing that should show if it is present and also give instructions on how to use it. if it is not there, it is a simple configuration option. hmm, now i have a question. i wonder if you have built gimp in the past with this option but the recent gimp build doesn't have it, if the old one will still exist on my computer. since there have been no complaints about it i have heard of, you might be a good debugger for it. carol ___ Gimp-user mailing list Gimp-user@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user