Re: Re: [Gimp-developer] start perl server
On Thu, 17 Jun 2004, Seth Burgess wrote: I'd recommend putting the call inside an 'eval' block, so that it failing doesn't stop the execution of the script. Sorry, I'm here again... ;-) If I run the attached script without parameters, then I can see that gimp appears and I can generate my needed image. But with parameters (without the appearing gimp window), I get the following: [EMAIL PROTECTED]:/home/wmi/cvs/wmi/ui ./oval-0707.pl -output_file FILENAME \ -font_size_pixels 11 -text_string TEXT oval-buttons.pl: gimp_text_get_extents_fontname: procedural database execution failed at ./oval-buttons.pl line 64 (DIE) I cannot 'eval' it out, because I need the data captured in line 64. Could you please help? TIA, Zoltan oval-0707.pl Description: Perl program ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: Re: [Gimp-developer] start perl server (Simon Budig)
Make sure that the text passed to the Gimp is in the UTF-8 encoding. Gimp is quite strict about that. Bye, Simon -- [EMAIL PROTECTED] http://simon.budig.de/ Thanks, it works now perfectly. :-) Zoltan ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] start perl server
Hi, kovzol [EMAIL PROTECTED] 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 ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: Re: [Gimp-developer] start perl server
On 17 Jun 2004, Sven Neumann wrote: Hi, kovzol [EMAIL PROTECTED] 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: [EMAIL PROTECTED]:~/cvs/wmi/ui ./oval-buttons.pl -font_size_pixels 11 -text_string This works. [EMAIL PROTECTED]:~/cvs/wmi/ui ./oval-buttons.pl -font_size_pixels 11 -text_string Unmglich. 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: [EMAIL PROTECTED]:~/cvs/wmi/ui ./oval-buttons.pl -text_string Unmglich 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: [EMAIL PROTECTED]:~/cvs/wmi/ui time ./oval-buttons.pl -font_size_pixels 11 -text_string Fast real0m0.609s user0m0.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(): [EMAIL PROTECTED]:~/cvs/wmi/ui gimp -i -b '(extension-perl-server 0 0 0)' [1] 2633 [EMAIL PROTECTED]:~/cvs/wmi/ui 1087502556: server version 2 started 1087502556: accepting connections on /tmp/gimp-perl-serv-uid-503/gimp-perl-serv [EMAIL PROTECTED]:~/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] Kiszolgl: oval-buttons.pl: gimp_display_new: procedural database execution failed at ./oval-buttons.pl line 144 (DIE) [EMAIL PROTECTED]:~/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 ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: Re: [Gimp-developer] start perl server
[Invalid UTF-8] Kiszolgl: oval-buttons.pl: gimp_display_new: procedural database execution failed at ./oval-buttons.pl line 144 (DIE) [EMAIL PROTECTED]:~/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: [EMAIL PROTECTED]:~/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) real0m0.132s user0m0.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 ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: Re: [Gimp-developer] 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 ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: Re: [Gimp-developer] start perl server
kovzol ([EMAIL PROTECTED]) 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: [EMAIL PROTECTED]:~/cvs/wmi/ui ./oval-buttons.pl -font_size_pixels 11 -text_string This works. [EMAIL PROTECTED]:~/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 -- [EMAIL PROTECTED] http://simon.budig.de/ ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: Re: [Gimp-developer] start perl server
Am I using gimp_display_new() in a wrong way? But during standalone run it works well... Why? I forgot to attach the current version of the script. Maybe this can give additional information. Zoltan oval-buttons.pl Description: Perl program ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] start perl server
On Wed, 16 Jun 2004 13:41:55 +0200 (CEST) kovzol [EMAIL PROTECTED] 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 - ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] start perl server
Hi, kovzol [EMAIL PROTECTED] 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 ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] start perl server
On 16 Jun 2004, Sven Neumann wrote: Hi, kovzol [EMAIL PROTECTED] 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. Dear Sven, as a developer of other software, I can agree with you. In addition, relying on your information, I installed gimp-2.0.2 and Gimp-2.0 (AKA Gimp-Perl :-). (I'm not a Perl expert, it was a craze to install new and new Perl modules... ;-) Now Gimp starts OK, and I can work with it. If I want to test the files in Gimp-2.0/t, I get the following: [EMAIL PROTECTED]:/usr/src/packages/SOURCES/Gimp-2.0/t ls loadlib.t load.t run.t [EMAIL PROTECTED]:/usr/src/packages/SOURCES/Gimp-2.0/t perl run.t 1..26 ok 1 ok 2 # skip ok 3 # skip ok 4 # skip ok 5 ok 6 ok 7 ok 8 run.t: unable to read the Perl-Server at run.t line 109. (ERROR) run.t: required callback 'net' not found (ERROR) [EMAIL PROTECTED]:/usr/src/packages/SOURCES/Gimp-2.0/t perl loadlib.t 1..1 ok 1 Now as I start gimp-2.0.2 and start a Perl server using the graphical user interface: [EMAIL PROTECTED]:/usr/src/packages/SOURCES/Gimp-2.0/t gimp-2.0 [1] 17697 [EMAIL PROTECTED]:/usr/src/packages/SOURCES/Gimp-2.0/t 1087410137: server version 2 started 1087410137: accepting connections on /tmp/gimp-perl-serv-uid-500/gimp-perl-serv [EMAIL PROTECTED]:/usr/src/packages/SOURCES/Gimp-2.0/t perl run.t 1..26 ok 1 ok 2 # skip ok 3 # skip ok 4 # skip ok 5 ok 6 ok 7 ok 8 run.t: unable to read the Perl-Server at run.t line 109. (ERROR) run.t: required callback 'net' not found (ERROR) Is this OK? (I got the same output when no Perl-server was started.) Now I'm trying to start my gimp-1.2 Perl-Fu script (attached): [EMAIL PROTECTED]:~ cd /home/wmi/cvs/wmi/ui/ [EMAIL PROTECTED]:/home/wmi/cvs/wmi/ui ./oval-buttons.pl 1087410392: accepted unix connection Illegal default font description for perl_fu_mysite_buttons: -*-luxi sans-medium-r-*-*-24-*-*-*-*-*-iso8859-2 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) 1087410424: closing connection 9 (45 requests in 32 seconds) The error message appeared after I changed the font (successfully) and pressed OK (finally, to generate the .xcf file). In gimp-1.2 there were no such problems (and the .xcf file was successfully generated). Could you please help? TIA, Zoltan oval-buttons.pl Description: Perl program ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer