Re: [Gimp-developer] Re: Gimp server startup
Hi Irek, Irek Sonina wrote: Andrei Simion wrote: Irek Sonina wrote: /usr/bin/gimp -c -i -s -b '(plug-in-script-fu-server 1 10008 \/tmp/gimpserverlog\)' '(gimp-quit 1)' 1/tmp/gimprunlog 2/tmp/gimperrlog Maybe try --display :1.0 -c -s, without no-interface. Thanks Irek, I'll try your command. The thing is that the 1.3 version of gimp worked just fine with my command. To clear the things out: are you connecting to the Gimp server through some kind of interface or you work with the Gimp in the graphic mode? I am connecting to a server with python script by Tjabo Kloppenburg sending to a server my script-fu, all without interface and without Xvfb. If you want a script just tell. Yes. Please send me that script on my private address. Thanks, Andrei ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: Regarding the fonts, where I can find the new font names? I finally managed to get Gimp running. But, when I got a script running I got this: Illegal default font description for perl_fu_newimage2: -*-utopia-bold-r-*-*-70-*-*-*-*-*-*-* So, the question is: what is the convention for font names? Have a look at the Fonts dialog. Utopia Bold should do the trick. Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Sven Neumann wrote: Hi, Andrei Simion [EMAIL PROTECTED] writes: Could you explain me to what extent I have to rewrite the code? Only very little has changed, there is a good chance that your script will work with no or only very little changes. You will switch from XLFD font names to the easier fontconfig names GIMP is using now. A Regarding the fonts, where I can find the new font names? I finally managed to get Gimp running. But, when I got a script running I got this: Illegal default font description for perl_fu_newimage2: -*-utopia-bold-r-*-*-70-*-*-*-*-*-*-* So, the question is: what is the convention for font names? Regards, Andrei ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Andrei Simion wrote: Irek Sonina wrote: /usr/bin/gimp -c -i -s -b '(plug-in-script-fu-server 1 10008 \/tmp/gimpserverlog\)' '(gimp-quit 1)' 1/tmp/gimprunlog 2/tmp/gimperrlog Maybe try --display :1.0 -c -s, without no-interface. Thanks Irek, I'll try your command. The thing is that the 1.3 version of gimp worked just fine with my command. To clear the things out: are you connecting to the Gimp server through some kind of interface or you work with the Gimp in the graphic mode? I am connecting to a server with python script by Tjabo Kloppenburg sending to a server my script-fu, all without interface and without Xvfb. If you want a script just tell. -- Irek Sonina ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Andrei Simion wrote: Hi again, I managed to start X: Xvfb :1.0 -screen 0 10x10x16 So, the display is 1. Now, I start the Gimp server: gimp --display 1 --no-interface --batch \('extension-perl-server 0 0 0'\) and I get this error: Invalid option --display I tried different --display options: :1, :1.0, 1.0. The result was the same. I would guess that if you are using --no-interface then you can't use at the same time --display... try to use --display to connect to Xvfb, but without --no-interface. I do not know if it will help you but I am running script-fu-server with following command: /usr/bin/gimp -c -i -s -b '(plug-in-script-fu-server 1 10008 \/tmp/gimpserverlog\)' '(gimp-quit 1)' 1/tmp/gimprunlog 2/tmp/gimperrlog Maybe try --display :1.0 -c -s, without no-interface. Regards, Irek Slonina ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: The reason I haven't done that was because there was no X server instaled and I presume the user installation can be done only by starting Gimp in the graphical interface, am I wright? A patch to change that would be very much appreciated. But you can easily work around it by copying a ~/.gimp-2.2 folder from a different computer. But could you please stop sending me private email and use the mailing-list instead? Thank you. Sorry about that. There is an explanation for this. This mailing list is set up that when someone sends an email on it, it has the to header field to the original sender and a cc to the list. Replying to this message would send one email to the email address in the to field. Sometimes I forget to replace the private address I'm replying to with the mailing list address. And this happened to me too as other members of the list replied only to me personally. Maybe something has to be done regarding the list configuration. The list configuration is fine. This is how a mailing-list is supposed to be set up. Munging the Reply-To: field is a bad thing to do (see http://www.unicom.com/pw/reply-to-harmful.html). Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Irek Sonina wrote: Andrei Simion wrote: Hi again, I managed to start X: Xvfb :1.0 -screen 0 10x10x16 So, the display is 1. Now, I start the Gimp server: gimp --display 1 --no-interface --batch \('extension-perl-server 0 0 0'\) and I get this error: Invalid option --display I tried different --display options: :1, :1.0, 1.0. The result was the same. I would guess that if you are using --no-interface then you can't use at the same time --display... try to use --display to connect to Xvfb, but without --no-interface. I do not know if it will help you but I am running script-fu-server with following command: /usr/bin/gimp -c -i -s -b '(plug-in-script-fu-server 1 10008 \/tmp/gimpserverlog\)' '(gimp-quit 1)' 1/tmp/gimprunlog 2/tmp/gimperrlog Maybe try --display :1.0 -c -s, without no-interface. Thanks Irek, I'll try your command. The thing is that the 1.3 version of gimp worked just fine with my command. To clear the things out: are you connecting to the Gimp server through some kind of interface or you work with the Gimp in the graphic mode? Thanks again, Andrei Simion ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: I managed to start X: Xvfb :1.0 -screen 0 10x10x16 So, the display is 1. Now, I start the Gimp server: gimp --display 1 --no-interface You cannot combine --display and --no-interface. If you don't want any user interface, then you don't need a display. I took the display option out of the startup command and the gimp server started. But, when I was running a script I got the same error as when I started the Gimp server without the X: 1117560504: accepted tcp connection from 127.0.0.1:32855 Gtk-WARNING **: cannot open display: at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp.pm line 264. 1117560504: closing connection 11 (1 requests in 0 seconds) What about setting the DISPLAY environment variable for the perl server (if it really needs a display) ? Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Sven Neumann wrote: Hi, Andrei Simion [EMAIL PROTECTED] writes: I managed to start X: Xvfb :1.0 -screen 0 10x10x16 So, the display is 1. Now, I start the Gimp server: gimp --display 1 --no-interface You cannot combine --display and --no-interface. If you don't want any user interface, then you don't need a display. I presume you need. Firstly, the 1.3 Gimp server worked fine with it. Secondly, if you start a the Xvfb (X virtual frame buffer) and assign a display for it, it means in my opinion that the Gimp has a display to output the images to. About the --no-interface, it means that you don't need the graphical interface of the Gimp, which is obvious as you run the Gimp in the server mode. I took the display option out of the startup command and the gimp server started. But, when I was running a script I got the same error as when I started the Gimp server without the X: 1117560504: accepted tcp connection from 127.0.0.1:32855 Gtk-WARNING **: cannot open display: at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp.pm line 264. 1117560504: closing connection 11 (1 requests in 0 seconds) What about setting the DISPLAY environment variable for the perl server (if it really needs a display) ? You mean a DISPLAY variable in each script? What we have to keep in mind is that the 1.3 version of the Gimp server worked fine in this configuration (the Xvfb and Gimp startup). Now, with the 2.2 I have problems and there is no documentation at all, except for the man page that doesn't say anything for my problem). Thanks, Andrei Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: What about setting the DISPLAY environment variable for the perl server (if it really needs a display) ? You mean a DISPLAY variable in each script? No, I mean setting DISPLAY in the environment you start GIMP and the perl-server from. What we have to keep in mind is that the 1.3 version of the Gimp server worked fine in this configuration (the Xvfb and Gimp startup). Now, with the 2.2 I have problems and there is no documentation at all, except for the man page that doesn't say anything for my problem). GIMP 1.3 is an unsupported development release. Nothing that worked there has ever been guarenteed to work in any later releases. Your choice to continue using GIMP 1.3 but don't expect any support from anyone then. Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Andrei Simion wrote: I managed to start X: Xvfb :1.0 -screen 0 10x10x16 So, the display is 1. Now, I start the Gimp server: gimp --display 1 --no-interface --batch \('extension-perl-server 0 0 0'\) If the above is all you have done, you have not done what Sven told you to do. After starting X you need to run gimp once without any arguments to let it run its installation steps. After it has completed its installation steps you may then try starting the server once more. ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Sven Neumann wrote: Hi, Andrei Simion [EMAIL PROTECTED] writes: What about setting the DISPLAY environment variable for the perl server (if it really needs a display) ? You mean a DISPLAY variable in each script? No, I mean setting DISPLAY in the environment you start GIMP and the perl-server from. Already did that and got the same result. Thanks, Andrei ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Sven Neumann wrote: Hi, Andrei Simion [EMAIL PROTECTED] writes: When I start the Gimp server with this command: gimp --no-interface --batch '(extension-perl-server 0 0 0)' I got these messages: GIMP is not properly installed for the current user. User installation was skipped because the '--no-interface' flag was used. To perform user installation, run the GIMP without the --no-interface' flag. GIMP: Could not open '/home/gimp/.gimp-2.2/pluginrc' for writing: No such file or directory GIMP: Unable to open a test swap file. To avoid data loss please check the location and permissions of the swap directory defined in your Preferences (currently ${gimp_dir}). You have obviously not done the user installation for gimp yet. You need to run gimp once with a user interface so that it creates the user ~/.gimp-2.2 folder. The reason I haven't done that was because there was no X server instaled and I presume the user installation can be done only by starting Gimp in the graphical interface, am I wright? But could you please stop sending me private email and use the mailing-list instead? Thank you. Sorry about that. There is an explanation for this. This mailing list is set up that when someone sends an email on it, it has the to header field to the original sender and a cc to the list. Replying to this message would send one email to the email address in the to field. Sometimes I forget to replace the private address I'm replying to with the mailing list address. And this happened to me too as other members of the list replied only to me personally. Maybe something has to be done regarding the list configuration. Andrei Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Andrei Simion wrote: Sorry about that. There is an explanation for this. This mailing list is set up that when someone sends an email on it, it has the to header field to the original sender and a cc to the list. Replying to this message would send one email to the email address in the to field. Sometimes I forget to replace the private address I'm replying to with the mailing list address. And this happened to me too as other members of the list replied only to me personally. Maybe something has to be done regarding the list configuration. This is intentional - google for reply to considered harmful. HTH, Michael -- The GIMP http://www.gimp.org | IRC: irc://irc.gimp.org/gimp Wiki http://wiki.gimp.org | .de: http://gimpforum.de Plug-ins http://registry.gimp.org | ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi again, I managed to start X: Xvfb :1.0 -screen 0 10x10x16 So, the display is 1. Now, I start the Gimp server: gimp --display 1 --no-interface --batch \('extension-perl-server 0 0 0'\) and I get this error: Invalid option --display I tried different --display options: :1, :1.0, 1.0. The result was the same. I mention that the 1.3 version of Gimp started with --display :1.0. I took the display option out of the startup command and the gimp server started. But, when I was running a script I got the same error as when I started the Gimp server without the X: 1117560504: accepted tcp connection from 127.0.0.1:32855 Gtk-WARNING **: cannot open display: at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp.pm line 264. 1117560504: closing connection 11 (1 requests in 0 seconds) Thanks, Andrei Sven Neumann wrote: Hi, Andrei Simion [EMAIL PROTECTED] writes: When I start the Gimp server with this command: gimp --no-interface --batch '(extension-perl-server 0 0 0)' I got these messages: GIMP is not properly installed for the current user. User installation was skipped because the '--no-interface' flag was used. To perform user installation, run the GIMP without the --no-interface' flag. GIMP: Could not open '/home/gimp/.gimp-2.2/pluginrc' for writing: No such file or directory GIMP: Unable to open a test swap file. To avoid data loss please check the location and permissions of the swap directory defined in your Preferences (currently ${gimp_dir}). You have obviously not done the user installation for gimp yet. You need to run gimp once with a user interface so that it creates the user ~/.gimp-2.2 folder. But could you please stop sending me private email and use the mailing-list instead? Thank you. Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Seth Burgess wrote: How exactly are you running it? If you're not supplying the parameters to it, it will try to start the dialog, which will require Gtk which requires an X server. I'm running it using the folowing: gimp --no-interface --batch '(extension-perl-server 0 0 0)' Andrei On 5/27/05, Andrei Simion [EMAIL PROTECTED] wrote: I managed to start the Gimp server. I read that one of its new features is that you don't need the X to run it. But, when I run an old Perl script I got this warning: 1117202349: accepted unix connection Gtk-WARNING **: cannot open display: at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp.pm line 264. 1117202349: closing connection 11 (0 requests in 0 seconds) I think the Perl script needs a display, but this can be obtained only by running X, which I shouldn't run. Another question would be whether the old Perl scripts (written for 1.x versions of Gimp) run on 2.2. Thanks, Andrei Andrei Simion wrote: Hi all, I have to run the Gimp server on a RH machine, but I don't have any clue how it can be started. Where can I find some documentation on that? I mention that the Gimp server will be accesed through a Perl interface. Regards, Andrei Simion ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Carol Spears wrote: On Fri, May 27, 2005 at 10:07:59AM -0400, Andrei Simion wrote: Another question would be whether the old Perl scripts (written for 1.x versions of Gimp) run on 2.2. no they dont. So I have to use other APIs like the new Gimp module. Could you explain me to what extent I have to rewrite the code? Thanks, Andrei carol ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Carol Spears wrote: On Fri, May 27, 2005 at 12:10:35PM -0400, Andrei Simion wrote: Carol Spears wrote: On Fri, May 27, 2005 at 10:07:59AM -0400, Andrei Simion wrote: Another question would be whether the old Perl scripts (written for 1.x versions of Gimp) run on 2.2. no they dont. Thank you. I have the Gimp Perl module installed. I think this is the API I should use. But is there any documentation/tutorial on that excepting the man page? the gimp-perl stuff is the least maintained of the scripting stuff (that is working). the gimp parts are fairly easy to determine via the Procedure Browser. i suggest getting the cvs source and reading the existing scripts. i was working on minor updating to some of those scripts (which is sad because there are so many who profited from this who are trained and capable of fixing it -- i am neither capable nor have i profited). And where is the cvs source? Are you talking about the source code for the gimp server? Are there perl scripts that access the server there? Thanks, Andrei ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
On Mon, May 30, 2005 at 10:58:06AM -0400, Andrei Simion wrote: Carol Spears wrote: On Fri, May 27, 2005 at 10:07:59AM -0400, Andrei Simion wrote: Another question would be whether the old Perl scripts (written for 1.x versions of Gimp) run on 2.2. no they dont. So I have to use other APIs like the new Gimp module. Could you explain me to what extent I have to rewrite the code? did you look at the scripts and read the error messages? the scripts that i fixed, i read the error messages and fixed them. i have more knowledge of gimp than of its scripting languages. one of the scripts was obviously broken within the perl module and i understand enough perl to know that i am the wrong person to be fixing these things. all of this i learned by loading the scripts into gimp, running them and seeing the messages. while i do not suggest this is the correct approach to answering your questions, it answered that question for me. plug-ins with the gui tell the deprecated code bits and the replacements in a select and paste-able dialog. carol ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: Could you explain me to what extent I have to rewrite the code? Only very little has changed, there is a good chance that your script will work with no or only very little changes. You will switch from XLFD font names to the easier fontconfig names GIMP is using now. A couple of functions have been renamed. You can find a comprehensive list in the libgimp/gimpcompat.h header. If you have problems, feel free to ask. Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
On Mon, May 30, 2005 at 11:04:27AM -0400, Andrei Simion wrote: Carol Spears wrote: i suggest getting the cvs source and reading the existing scripts. i was working on minor updating to some of those scripts (which is sad because there are so many who profited from this who are trained and capable of fixing it -- i am neither capable nor have i profited). And where is the cvs source? Are you talking about the source code for the gimp server? Are there perl scripts that access the server there? i made sure that information about how to get the gimp things from cvs is available on the gimp web site. while it does not directly explain how to get the perl module, it takes only a little jump in logic and perhaps some limited reading of gnomecvs documentation to get the all of the gimp source modules via cvs checkout. it would be helpful to me if you can tell me how successful you can be at finding this information from http://www.gimp.org, understanding of course that it is set up for the non-programmer and needs people with programming background to understand more on their own. i think it would be better to fix the information that has been online for years than it would be to explain this to you. let me know how it goes, carol ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: And where is the cvs source? http://gimp.org/source/#gimp_from_cvs http://developer.gimp.org/cvs.html Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
[Gimp-developer] Re: Gimp server startup
I managed to start the Gimp server. I read that one of its new features is that you don't need the X to run it. But, when I run an old Perl script I got this warning: 1117202349: accepted unix connection Gtk-WARNING **: cannot open display: at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp.pm line 264. 1117202349: closing connection 11 (0 requests in 0 seconds) I think the Perl script needs a display, but this can be obtained only by running X, which I shouldn't run. Another question would be whether the old Perl scripts (written for 1.x versions of Gimp) run on 2.2. Thanks, Andrei Andrei Simion wrote: Hi all, I have to run the Gimp server on a RH machine, but I don't have any clue how it can be started. Where can I find some documentation on that? I mention that the Gimp server will be accesed through a Perl interface. Regards, Andrei Simion ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
On Fri, May 27, 2005 at 10:07:59AM -0400, Andrei Simion wrote: Another question would be whether the old Perl scripts (written for 1.x versions of Gimp) run on 2.2. no they dont. carol ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Gimp server startup
Seth Burgess wrote: How exactly are you running it? If you're not supplying the parameters to it, it will try to start the dialog, which will require Gtk which requires an X server. I started the gimp server using this: gimp --no-interface --batch '(extension-perl-server 0 0 0)' The script looks like this: #!/usr/bin/perl use Gimp :auto; use Gimp::Fu; # create a footer image sub newimage { my ($width, $height, $backgroundcolor, $foregroundcolor, $borderSize, $borderColor, $typeFace, $typeSize, $typeColor, $dividerAboveSize, $dividerAboveWidth, $dividerAboveColor, $text, $dividerBelowSize, $dividerBelowWidth, $dividerBelowColor, $divider_offset ) = @_; # Create a new image $img = gimp_image_new($width, $height, RGB); # Create a new layer $layer = gimp_layer_new($img, $width, $height, RGB, Layer 1, 0, NORMAL_MODE); # define the background colors # $backgroundcolor = #FF; # blue # $foregroundcolor = #FF; # red # $backgroundcolor = $color1; # $foregroundcolor = $color2; gimp_palette_set_background($backgroundcolor); gimp_palette_set_foreground($foregroundcolor); # add the layer to the image gimp_image_add_layer($img, $layer, -1); # gimp_selection_all($img); gimp_layer_add_alpha($layer); gimp_drawable_fill($layer,TRANS_IMAGE_FILL); # gimp_selection_border($img, 3); #script_fu_addborder($img, $layer, 3, 3, #00, 100); # gimp_palette_set_background(#00); # change the foreground color gimp_palette_set_background($borderColor); # draw the border # define first region gimp_rect_select ($img, 0, 0, $width, $borderSize, 2, 0, 0); # (x1, y1, x2, y2) # fill the region gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0); # define the second region $height_sec_region = $height - $borderSize; gimp_rect_select ($img, 0, $height_sec_region, $width, $height, 2, 0, 0); # fill the second region gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0); # define the left lateral region gimp_rect_select($img, 0, 0, $borderSize, $height, 2, 0, 0); # fill the region gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0); # define the right lateral region $width_lat_region = $width - $borderSize; gimp_rect_select($img, $width_lat_region, 0, $width, $height, 2, 0, 0); # fill the region gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0); # create the dividers # upper divider # calculate the width of divider $x_start_above_div = (($width - ($dividerAboveWidth/100) * $width)/2) + $borderSize; $x_end_above_div = ($dividerAboveWidth/100) * $width - $borderSize * 2; gimp_rect_select($img, $x_start_above_div, $divider_offset, $x_end_above_div, $dividerAboveSize, 2, 0, 0); # fill the region # change the background color gimp_palette_set_background($dividerAboveColor); gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0); # lower divider # calculate the y coordinates for the divider $y_start_below_div = $height - ($divider_offset+$dividerBelowSize); $y_end_below_div = $dividerBelowSize; # calculate the width of divider $x_start_below_div = (($width - ($dividerBelowWidth/100) * $width)/2) + $borderSize; $x_end_below_div = ($dividerBelowWidth/100) * $width - $borderSize * 2; gimp_rect_select($img, $x_start_below_div, $y_start_below_div, $x_end_below_div, $y_end_below_div, 2, 0, 0); # fill the region # change the background color gimp_palette_set_background($dividerBelowColor); gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0); # my $font = qq{-*-agenda-medium-r-normal-*-24-*-*-*-*-*-*-*}; # set the foreground with the font color gimp_palette_set_foreground($typeColor); my $text_layer = gimp_text_fontname($layer, 0, 0, $text, -1, #border 1, #antialias $typeSize, #size 0, #size type $typeFace ); # determine the position of the text my $texty = $height/2 - $text_layer-height/2; my $textx = $width/2 - $text_layer-width/2; # pull out text layer we were checking size and fonts on. gimp_image_remove_layer($img,$text_layer); # create again the layer $text_layer = gimp_text_fontname($layer, $textx, $texty, $text, -1, #border 1, #antialias $typeSize, #size 0, #size type $typeFace ); gimp_floating_sel_anchor($text_layer); # draw the border
Re: [Gimp-developer] Re: Gimp server startup
Hi, Andrei Simion [EMAIL PROTECTED] writes: I managed to start the Gimp server. I read that one of its new features is that you don't need the X to run it. But, when I run an old Perl script I got this warning: 1117202349: accepted unix connection Gtk-WARNING **: cannot open display: at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp.pm line 264. 1117202349: closing connection 11 (0 requests in 0 seconds) I think the Perl script needs a display, but this can be obtained only by running X, which I shouldn't run. GIMP 2.x doesn't need a display if run with the --no-interface option. That doesn't hold true if you want to use any plug-ins that open an X11 conncetion on their own. I wouldn't have expected the perl server to do that though. Can someone reproduce this problem? Sven ___ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer