RSS/Atom feed Twitter
Site is read-only, email is disabled

Plugin examples - link broken on Gimp web site.

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Plugin examples - link broken on Gimp web site. Jonathan Bartlett 11 Aug 05:04
Plugin examples - link broken on Gimp web site. Joao S. O. Bueno 11 Aug 06:24
Jonathan Bartlett
2003-08-11 05:04:50 UTC (over 20 years ago)

Plugin examples - link broken on Gimp web site.

Also, I want to use Gimp to render GIF Graphics on the fly. Gimp would run on the server, and data stored on the server would hopefully be used to render histograms, pie charts, etc and dished out to people visiting the site.

Gimp _can_ be used for this purpose, but probably a different solution (such as the GD library and it's associated graphing library) would be best. I use GIMP a lot from the command-line, but the problem with how I do it is that I run a new GIMP process for every graphic, which takes several seconds to load, thus would really load down your server if you were doing it in real time. The way you would need to do it is to run the script-fu-server, although I'm not sure this can be done without GUI mode, although it might. I have not played with the script-fu-server myself.

Anyway, the way my command-line works is this:

1) I have a script-fu script in scheme

2) I create the following shell script:

#!/bin/sh

gimp -i -d -s -b "(nmm-create-and-save-blue-button \"$1\" \"$2\")" "(gimp-quit 0)" 2>/dev/null

nmm-create-and-save-blue-button is my script-fu script, which takes two parameters - the text for the button and the filename. The GIMP flags may need to be modified for your purpose. The one thing is that your scripts CANNOT mess with displays. For example, if you try to do gimp-display-new, you'll get an error, since you don't have a GUI.

Now, if you decide that not having a GUI is too much of a pain, you can always run Xvfb, which is an X server that runs in memory only (i.e. - it doesn't display on a screen - it's a "virtual frame buffer").

Anyway, I hope that helps. My guess is, although I haven't tried it, si that you would want to run GIMP with

gimp -i -c -s -b '(1 10008 "/var/log/gimp.log")' &

And then connect to port 10008 and give it your commands (although I think they have to be in scheme, but if you're using the procedural database, the functions you access can be in any language).

Let me know if you have questions.

Jon

John

Joao S. O. Bueno
2003-08-11 06:24:06 UTC (over 20 years ago)

Plugin examples - link broken on Gimp web site.

On Sunday 10 August 2003 10:33 pm, John D. wrote:

In the Gimp web site at http://www.gimp.org/docs.html there is a "Plugin Examples" link. That link is broken. Does anyone have any examples on how to write plugins?

Also, I want to use Gimp to render GIF Graphics on the fly. Gimp would run on the server, and data stored on the server would hopefully be used to render histograms, pie charts, etc and dished out to people visiting the site.

The web server doesn't have any graphics stuff on it at all, and I'm hoping that I can use Gimp to render images (without displaying them - except on visitor's browsers).

Can Gimp be used for this purpose? If so, then where can I find example code that does this. By the way, I'm using the Python Gimp Modules, and prefer to find the code in Python, but I can accept it in C. Usually Python parallels C pretty closely.

When I needed to serve images, and was working in Python, I set for the Python Imaging module. I did not ever try to have the script-fu server working as Jonathan said on the other e-mail.

Python Imaging have some shorthands...when I needed to rotate text to fit it as histogram labels, for example, I ended up with it being quite unreadable, and had to work around it with some blur filters.

OTOH, It's hard to have GIMP creating graphics from scratch like those you want.
When faced with that, I started creating a Graphic Turtle API using the Python Fu wich turns it a breeze to draw specific shapes in the GIMP from a python script. It is not ready to "go public" - but it is mature enough to be used in the situation you describe.

So, if you actually manage to set up gimp with python scripting on the server, just contact me - it will be a pleasure to share that code earlier with you.

BTW, the hIstograns I generate with python imaging are rather cool - although with a dirtier code. Anyway, if you go for python imaging instead, write me also.

John

Regards,

JS
->