start perl server
This discussion is connected to the gimp-developer-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.
20040615190033.A1CE213B07@l... | 07 Oct 20:23 | |
start perl server | kovzol | 16 Jun 13:41 |
start perl server | Vegard Vesterheim | 16 Jun 16:46 |
start perl server | kovzol | 16 Jun 16:52 |
start perl server | Sven Neumann | 16 Jun 17:57 |
Pine.LNX.4.44.0406162019260... | kovzol | 16 Jun 20:35 |
start perl server | Sven Neumann | 17 Jun 10:08 |
start perl server | kovzol | 17 Jun 22:08 |
start perl server | kovzol | 17 Jun 22:16 |
start perl server | Seth Burgess | 17 Jun 23:17 |
Pine.LNX.4.44.0407071437580... | kovzol | 07 Jul 14:43 |
start perl server | Simon Budig | 18 Jun 00:41 |
Pine.LNX.4.44.0406180152410... | kovzol | 18 Jun 01:54 |
start perl server
Hello, I'm using GIMP-1.2.5 under Linux. Is it possible to start the GIMP-Perl server from command line? (As I earlier mentioned, I'd like to run a Perl-Fu script and as I experienced, I have about 60% of speedup on a 256 MB RAM, 600 MHz PC machine if I start GIMP-Perl server first from GIMP, but in the future I should start the GIMP-Perl server automagically, e.g. on booting Linux.)
Thank you in advance.
Zoltan
start perl server
On Wed, 16 Jun 2004 13:41:55 +0200 (CEST) kovzol wrote:
Hello, I'm using GIMP-1.2.5 under Linux. Is it possible to start the GIMP-Perl server from command line?
Sure, do something like this:
gimp -i -b '(extension-perl-server 0 0 0)'&
(As I earlier mentioned, I'd like to run a Perl-Fu script and as I experienced, I have about 60% of speedup on a 256 MB RAM, 600 MHz PC machine if I start GIMP-Perl server first from GIMP, but in the future I should start the GIMP-Perl server automagically, e.g. on booting Linux.)
AFAIK Gimp 1.2 still needs access to a X server for font rendering. To implement a 'headless Gimp server', you could use Xvfb.
Gimp 2.0.X does font rendering on the client side, no X server required. Might be a better solution.
Dynamic web graphics using a 'Gimp server' for 'on-the-fly rendering' is pretty cool stuff. Speed is often an issue, so caching the rendering results might be a good idea. I implemented something like this a couple of years ago, when graphic rendering of textual content (menu buttons, etc) was fashionable ;-).
- Vegard -
start perl server
On 16 Jun 2004, Vegard Vesterheim wrote:
On Wed, 16 Jun 2004 13:41:55 +0200 (CEST) kovzol wrote:
Hello, I'm using GIMP-1.2.5 under Linux. Is it possible to start the GIMP-Perl server from command line?
Sure, do something like this:
gimp -i -b '(extension-perl-server 0 0 0)'&
I guess I need this. Thanks! :-)
(As I earlier mentioned, I'd like to run a Perl-Fu script and as I experienced, I have about 60% of speedup on a 256 MB RAM, 600 MHz PC machine if I start GIMP-Perl server first from GIMP, but in the future I should start the GIMP-Perl server automagically, e.g. on booting Linux.)
AFAIK Gimp 1.2 still needs access to a X server for font rendering. To implement a 'headless Gimp server', you could use Xvfb.
I already use it. Indeed, this is a needed issue. :-)
Gimp 2.0.X does font rendering on the client side, no X server required. Might be a better solution.
I had many hours of headache figuring the right solution out to write my own code in Gimp-Perl --- I was browsing the internet a lot, but there were many versions of the same statements in Gimp-Perl with different syntax. :-( So I'm also afraid that my script will be incompatible with 2.0.x --- that's why I don't really want to upgrade yet. :-)
Dynamic web graphics using a 'Gimp server' for 'on-the-fly rendering' is pretty cool stuff. Speed is often an issue, so caching the rendering results might be a good idea. I implemented something like this a couple of years ago, when graphic rendering of textual content (menu buttons, etc) was fashionable ;-).
We're traveling on the same train, I guess... :-) I also did the same thing in WebMathematics Interactive (http://www.sf.net) and this stuff I want to do now is exactly for this software, too. :-)
A last question, however it should be clear after a short time: may I run
$ gimp -i -b '(extension-perl-server 0 0 0)' -display :1 &
or something like this to force gimp-perl-server to run on a different X (namely Xvfb)?
Thanks a lot.
Regards, Zoltan
start perl server
Hi,
kovzol writes:
I had many hours of headache figuring the right solution out to write my own code in Gimp-Perl --- I was browsing the internet a lot, but there were many versions of the same statements in Gimp-Perl with different syntax. :-( So I'm also afraid that my script will be incompatible with 2.0.x --- that's why I don't really want to upgrade yet. :-)
Most likely your script will just work. Fear of incompatibility is not really a good reason to stick to an outdated and unmaintained version.
Sven
start perl server
Hi,
kovzol writes:
Illegal default font description for perl_fu_mysite_buttons: -*-luxi sans-medium-r-*-*-24-*-*-*-*-*-iso8859-2
GIMP doesn't use X Logical Font Descriptors any longer, so please change this to "Sans Medium".
oval-buttons.pl: Expected an INT32 but got 'BG_IMAGE_FILL'. Add '*1' if you really intend to pass in a string at ./oval-buttons.pl line 110 (DIE)
Please update your enums, this should be BACKGROUND_FILL instead of BG_IMAGE_FILL. Have a look at gimpcompat.h that documents these changes.
Sven
start perl server
On 17 Jun 2004, Sven Neumann wrote:
Hi,
kovzol writes:
Illegal default font description for perl_fu_mysite_buttons: -*-luxi sans-medium-r-*-*-24-*-*-*-*-*-iso8859-2
GIMP doesn't use X Logical Font Descriptors any longer, so please change this to "Sans Medium".
Thank you for your help! I changed this to the needed font. The only problem is if I want to use accented letters, I run into an error:
wmi@wmi:~/cvs/wmi/ui> ./oval-buttons.pl -font_size_pixels 11 -text_string
"This works."
wmi@wmi:~/cvs/wmi/ui> ./oval-buttons.pl -font_size_pixels 11 -text_string
Unmöglich.
oval-buttons.pl: gimp_text_get_extents_fontname: procedural database
execution failed at ./oval-buttons.pl line 64 (DIE)
By the way, why must I define font_size_pixels? Without it I get into another error:
wmi@wmi:~/cvs/wmi/ui> ./oval-buttons.pl -text_string Unmöglich oval-buttons.pl: Unable to convert a reference to type 'FLOAT' at ./oval-buttons.pl line 64 (DIE)
oval-buttons.pl: Expected an INT32 but got 'BG_IMAGE_FILL'. Add '*1' if you really intend to pass in a string at ./oval-buttons.pl line 110 (DIE)
Please update your enums, this should be BACKGROUND_FILL instead of BG_IMAGE_FILL. Have a look at gimpcompat.h that documents these changes.
Sometimes it helps, sometimes not. Sorry to say, but I didn't find an accurate, updated, fresh documentation about the syntax of the Gimp-Perl (2.0) statements. Is there any?
A last note: I didn't even have to run Perl-Server within Gimp to run my script reasonably fast:
wmi@wmi:~/cvs/wmi/ui> time ./oval-buttons.pl -font_size_pixels 11 -text_string Fast
real 0m0.609s
user 0m0.080s
sys 0m0.000s
Congratulations for this speedup (it's about 7 times faster than gimp-1.2.5 did)! However, server mode run fails on gimp_display_new():
wmi@wmi:~/cvs/wmi/ui> gimp -i -b '(extension-perl-server 0 0 0)'&
[1] 2633
wmi@wmi:~/cvs/wmi/ui> 1087502556: server version 2 started
1087502556: accepting connections on
/tmp/gimp-perl-serv-uid-503/gimp-perl-serv
wmi@wmi:~/cvs/wmi/ui> ./oval-buttons.pl -font_size_pixels 11 -text_string Fast
1087502561: accepted unix connection
oval-buttons.pl: gimp_display_new: procedural database execution failed at
./oval-buttons.pl line 144 (DIE)
[Invalid UTF-8] Kiszolgáló: oval-buttons.pl: gimp_display_new: procedural
database execution failed at ./oval-buttons.pl line 144 (DIE)
wmi@wmi:~/cvs/wmi/ui> 1087502561: closing connection 9 (136 requests in 0 seconds)
Am I using gimp_display_new() in a wrong way? But during standalone run it works well... Why?
TIA, Zoltan
start perl server
[Invalid UTF-8] Kiszolgáló: oval-buttons.pl: gimp_display_new: procedural database execution failed at ./oval-buttons.pl line 144 (DIE)
wmi@wmi:~/cvs/wmi/ui> 1087502561: closing connection 9 (136 requests in 0 seconds)
Am I using gimp_display_new() in a wrong way? But during standalone run it works well... Why?
If I cut lines 144 and 145, then it works OK:
wmi@wmi:~/cvs/wmi/ui> time ./oval-buttons.pl -font_size_pixels 11
-text_string Fast
1087503061: accepted unix connection
1087503061: closing connection 9 (133 requests in 0 seconds)
real 0m0.132s
user 0m0.090s
sys 0m0.000s
This is really nice (another 4 times of speedup). However, it would be great if I will be able to decide if gimp_display_new() is prohibited to run or not (within the script), i.e. to know if my script was called without any parameters.
TIA, Zoltan
start perl server
oval-buttons.pl: gimp_display_new: procedural database execution failed at ./oval-buttons.pl line 144 (DIE)
[Invalid UTF-8] Kiszolgáló: oval-buttons.pl: gimp_display_new: procedural database execution failed at ./oval-buttons.pl line 144 (DIE)
If you're running in batch mode, trying to open a display probably should cause an error (no UI enviornment is setup in gimp to do this!) .
I'd recommend putting the call inside an 'eval' block, so that it failing doesn't stop the execution of the script.
Seth
start perl server
kovzol (kovzol@math.u-szeged.hu) wrote:
Thank you for your help! I changed this to the needed font. The only problem is if I want to use accented letters, I run into an error:
wmi@wmi:~/cvs/wmi/ui> ./oval-buttons.pl -font_size_pixels 11 -text_string "This works."
wmi@wmi:~/cvs/wmi/ui> ./oval-buttons.pl -font_size_pixels 11 -text_string Unmöglich.
oval-buttons.pl: gimp_text_get_extents_fontname: procedural database execution failed at ./oval-buttons.pl line 64 (DIE)
Make sure that the text passed to the Gimp is in the UTF-8 encoding. Gimp is quite strict about that.
Bye, Simon