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

develop web-based image editing application with gimp as backend engine

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.

develop web-based image editing application with gimp as backend engine Vu The Cuong 11 Dec 13:05
  develop web-based image editing application with gimp as backend engine saulgoode@flashingtwelve.brickfilms.com 11 Dec 22:55
Vu The Cuong
2008-12-11 13:05:25 UTC (about 16 years ago)

develop web-based image editing application with gimp as backend engine

Hi all

The subject says it all. Currently I'm considering to

develop web-based (PHP) image editing application with gimp as backend engine for intranet use.

But I don't know where to start from. Could anyone point me to the right direction?

Please help me, I need your help.

Thanks and regards,

saulgoode@flashingtwelve.brickfilms.com
2008-12-11 22:55:21 UTC (about 16 years ago)

develop web-based image editing application with gimp as backend engine

Quoting Vu The Cuong :

The subject says it all. Currently I'm considering to develop web-based (PHP) image editing application with gimp as backend engine for intranet use.

I responded to your post on GIMPtalk but thought I'd echo it here for posterity's sake...

You will need to start the GIMP's Script-fu server plug-in and then have your PHP program talk to the server over a TCP port. Script-fu commands are sent over the TCP port prefixed by "Gxy" where x and y together specify the length of the command in bigEndian-style.

Here is a quick run-through (for GNU/Linux using BASH):

1. As root, create a file /dev/tcp/127.0.0.1/10008 2. As root, chmod the mode of that file to 666 3. start the GIMP in the background with the server plug-in being the only interface:
gimp -i -b '(plug-in-script-fu-server 1 10008 "/home/cuongvt/script-fu-server.log")' & 4. To monitor the activity, run
tail -f /home/cuongvt/script-fu-server.log (you will need to wait a while for GIMP to start up) 5. From another shell, type the following: echo -e "G\0000\0015(gimp-quit 0)" >/dev/tcp/127.0.0.1/10008

(The '\0000\0015' part is the string length of "(gimp-quit 0)" as characters specified in octal.)

You should see messages similar to the following appear in the log file:

Server: connect from host 127.0.0.1, port XXXXX. Received request #0 from IP address 127.0.0.1: (gimp-quit 0) on Thu Dec 11 16:44:57 2008
,[Request queue length: 1]Processing request #0

Of course, you will want to use a PHP client (instead of "echo") and to have it count the string lengths and provide the proper prefix automatically. Also, I don't use PHP and don't know how it sends and receives data over a TCP port.