[Gimp-developer] GIMP-Python

2009-04-07 Thread Andrei Simion
Hi,

Does anybody know where I can download GIMP-Python from? Our sysadmin 
says that whatever he found on the Internet does not work.

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] patterns in Gimp

2008-07-07 Thread Andrei Simion
Hi,

I know that Gimp patterns are actually files having the extension .pat. 
I want to upgrade from an older version of Gimp (1.2) to 2.4.

When applying a pattern called 'GIMP Pattern #1' in 1.2 and 2.4 it does 
not produce the same result. I'd like to know where do the patterns of 
this type reside. I mean I could find the pattern files directory, but 
there are no patterns of type 'Gimp Pattern #n' neither on 1.2 nor on 2.2.

If there's a mapping between these patterns and the pattern file names, 
I'd be glad if you could let me know. If these patterns don not 
correspond to pattern files, then the question is if they create the 
same image with the newer versions of the Gimp. According to my tests 
they are not.

Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] international chars in Gimp

2008-06-27 Thread Andrei Simion
Hi,

Does Gimp support German characters. I work on Mac and I want to add 
text on an image. I cannot copy/paste the character Ü because Gimp uses 
its own clipboard, so I have to somehow type it in. What I can do?

Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] international characters in Gimp

2008-06-27 Thread Andrei Simion
Hi,

Does Gimp support German characters. I work on Mac and I want to add 
text on an image. I cannot copy/paste the character Ü because Gimp uses 
its own clipboard, so I have to somehow type it in. What I can do?

Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp memory leak

2008-04-29 Thread Andrei Simion
Sven Neumann wrote:
 Hi,
 
 On Mon, 2008-04-28 at 22:06 -0400, Andrei Simion wrote:
 
 This is what I obtained after the Gimp server crashed. That's it, it 
 doesn't create the swap file after the memory allocated for it finishes. 
 Is this a configuration problem?
 
 Sorry, but I don't understand that question. You are aware of how GIMP's
 swapping works and how it relates to the configured size of the
 tile-cache, aren't you? I have the impression that there are some basic
 misunderstandings here.

OK, the tile-cache-size refers to the amount of pixel data. But the 
question still remains: why the Gimp could crash?

I noticed that the memory used by the Gimp server when batch generating 
images goes higher and higher and after no physical memory is left, then 
the Gimp server crashes.



 
 
 Sven
 

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp memory leak

2008-04-29 Thread Andrei Simion
Hi,

Sven Neumann wrote:

 That is the usual behavior of all applications based on GLib. In an
 out-of-memory situation, the application exits with an error message.
 This is probably what you are calling a 'crash'. This can usually be
 avoided by setting the tile-cache size reasonably and by providing
 enough virtual memory.
 
 The memory usage during batch processing should remain pretty much
 constant though. This indicates that there is likely a memory leak
 somewhere. valgrind should help to locate the problem.

This is the problem. The memory used by the Gimp process grows 
constantly. After finishing up the physical memory, it does not create 
the swap file.

On Gimp 1.2 the swap file was created, but it kept growing. On 2.2 and 
2.4, no swap file is created and the Gimp process terminates.

What size should I set for the tile-cache? Currently I use a value of 
128 MB.

Andrei

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp memory leak

2008-04-28 Thread Andrei Simion
Hi,

Sven Neumann wrote:

 This may very well be a memory leak in Gimp-Perl. Have you run this in
 valgrind with leak-check enabled? That should give you a good idea of
 where the leak actually is.

This is the valgrind report:

==31947==
==31947== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
==31947== malloc/free: in use at exit: 47,785 bytes in 1,684 blocks.
==31947== malloc/free: 1,246,403 allocs, 1,244,719 frees, 23,095,553 
bytes allocated.
==31947== For counts of detected errors, rerun with: -v
==31947== searching for pointers to 1,684 not-freed blocks.
==31947== checked 207,552 bytes.
==31947==
==31947== 50 (16 direct, 34 indirect) bytes in 1 blocks are definitely 
lost in loss record 1 of 5
==31947==at 0x4A05809: malloc (vg_replace_malloc.c:149)
==31947==by 0x455F4A: xmalloc (in /bin/bash)
==31947==by 0x41F103: (within /bin/bash)
==31947==by 0x421273: yyparse (in /bin/bash)
==31947==by 0x41B091: parse_command (in /bin/bash)
==31947==by 0x41B14B: read_command (in /bin/bash)
==31947==by 0x41B38D: reader_loop (in /bin/bash)
==31947==by 0x41AE08: main (in /bin/bash)
==31947==
==31947== LEAK SUMMARY:
==31947==definitely lost: 16 bytes in 1 blocks.
==31947==indirectly lost: 34 bytes in 1 blocks.
==31947==  possibly lost: 0 bytes in 0 blocks.
==31947==still reachable: 47,735 bytes in 1,682 blocks.
==31947== suppressed: 0 bytes in 0 blocks.
==31947== Reachable blocks (those to which a pointer was found) are not 
shown.
==31947== To see them, rerun with: --show-reachable=yes

This is what I obtained after the Gimp server crashed. That's it, it 
doesn't create the swap file after the memory allocated for it finishes. 
Is this a configuration problem?

Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp memory leak

2008-04-21 Thread Andrei Simion
[EMAIL PROTECTED] wrote:
 On Mon, 21 Apr 2008 20:58:36 +0200, Andrei Simion [EMAIL PROTECTED] 
 wrote:
 
 Hi,

 I previously reported a memory leak in Gimp 2.2.

 I was told to install version 2.4 and the issue doesn't go away.

 The problem is that I discovered something even worst and it does take
 place in both 2.2 and 2.4.

 If one runs a Gimp-Perl script for a number of times, enough to use the
 whole physical memory, then the Gimp server crashes, it does not create
 the swap. That's it, no swap file is created.

 I think there may be a configuration issue.

 If a test script is needed I can provide it.

 Thanks,
 Andrei
 
 That would certainly be worthwhile.
 
 pls post.
 
 /gg
 

#!/usr/bin/perl

use Gimp qw(:auto);
use Gimp::Fu;
#use Gimp::Compat;

sub logov1 {
 my($text, $font, $fontsize, $fontcolor, $outlinesize, $outlinecolor,
 $shadowoffset, $shadowblur, $embossamount, $glowamount,
 $bevelamount, $texture, $alignment, $bgfile, $logowidth,
 $logoheight,$usebgdim,$textoffset,$vertoffset,$glowopacity,
 $textureopacity,$buttontexture,$buttoncolor,$buttonstyle,
 $backimage,$outfile) = @_;

 gimp_context_push();

 #print STDOUT bgfile: $bgfile\n;
 if ($bgfile ne none) {
 $img = gimp_file_load($bgfile,$bgfile);
 } else {
#print creating background with $buttontexture,$buttonstyle\n;
 $backgroundcolor = #FF;
if ($backimage ne ) {
 $backgroundcolorimage = gimp_file_load($backimage,$backimage);

#   $backgroundcolor = 
gimp_image_pick_color($backgroundcolorimage,$drawable,1,1,1,0,0,1);
 } else {
 $backgroundcolor = #FF;
 }

 gimp_context_set_background($backgroundcolor);
 gimp_context_get_background();

 $img = gimp_image_new($logowidth,$logoheight,RGB);
 $layer = 
gimp_layer_new($img,$logowidth,$logoheight,0,Background,100,0);
 gimp_image_add_layer($img,$layer,0);
 gimp_layer_add_alpha($layer);
 gimp_selection_all($img);
 gimp_drawable_fill($layer,BACKGROUND_FILL);

 $buttonlayer = 
gimp_layer_new($img,$logowidth,$logoheight,0,Button layer,100,0);
 gimp_image_add_layer($img,$buttonlayer,0);
 gimp_layer_add_alpha($buttonlayer);
 gimp_drawable_fill($buttonlayer,TRANSPARENT_FILL);
 gimp_selection_none($img);

 # start button style
 if ($buttonstyle =~ /round/i) {
# select elipse and rectangle added together for rounded button
 
gimp_ellipse_select($img,$logowidth-$logoheight,0,$logoheight,$logoheight,0,1,0,0);
 gimp_rect_select($img,0,0,$logowidth - 
$logoheight/2,$logoheight,0,0,0);
 } else {
 gimp_selection_all($img);
 }

 # button texture
 if ($buttontexture ne none) {
 open(LOG1, /home/build/gimp/logs/gimp_steve_pm.log);
 print LOG1 Button texture: $buttontexture\n;
 close(LOG1);

 $success = 0;
 ($numPatterns, @pattern_list) = gimp_patterns_get_list('');
 foreach $pattern (@pattern_list) {
 #print STDOUT $pattern . \n;
 if ($pattern eq $buttontexture) {
 $success = 1;
 #print STDOUT \n\nsuccess [$buttontexture]\n\n;
 break;
 }
 }
 if ($success) {
 gimp_context_set_pattern($buttontexture);
 
#gimp_edit_bucket_fill($buttonlayer,PATTERN_FILL,0,100,0,0,0,0);
 
gimp_edit_bucket_fill($buttonlayer,PATTERN_BUCKET_FILL,0,100,0,0,0,0);
 plug_in_colorify($img,$buttonlayer,$buttoncolor);
 }
 }

 if (0) {
 $success = 0;
 @pattern_list = gimp_patterns_get_list();
 foreach $pattern (@pattern_list) {
 if ($pattern eq $buttontexture) {
 $success = 1;
 #print \n\nsuccess $buttontexure\n\n;
 break;
 }
 }

 if ($success) {
 $textureimg = gimp_image_new($logowidth,$logoheight,GRAY);

 $texturelayer = 
gimp_layer_new($textureimg,$logowidth,$logoheight,GRAY-IMAGE,Texture 
layer,$textureopacity,0);
 $texturelayer2 = 
gimp_layer_new($img,$logowidth,$logoheight,RGB-IMAGE,Texture 
layer,$textureopacity,0);

 gimp_drawable_fill($texturelayer,PATTERN_FILL);
 gimp_drawable_fill($texturelayer2,PATTERN_FILL);
 gimp_layer_add_alpha($texturelayer);
 gimp_layer_add_alpha($texturelayer2);


 gimp_context_set_pattern($buttontexture);
 
gimp_edit_bucket_fill($texturelayer,2,0,$textureopacity,255,0,0,0);
 gimp_image_add_layer($textureimg,$texturelayer,0);

 gimp_image_convert_rgb($textureimg);

 gimp_selection_all($textureimg);
 gimp_edit_copy

Re: [Gimp-developer] Gimp-Perl memory leak

2008-03-29 Thread Andrei Simion
Hi,

Sven Neumann wrote:
 
 The swap file only resizes itself when tiles at the end of the swap file
 are freed. So you may have to free all tiles before the swap file
 resizes itself to zero. If if doesn't do that, then your script leaks an
 image or a drawable somewhere (or it calls a function that leaks).

I read that the tiles in the files should be empty in order to allow the 
swap to resize itself. But how I can do that? Is there a method that 
should be called after deleting the image?

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp-Perl memory leak

2008-03-29 Thread Andrei Simion
Kevin Cozens wrote:
 Andrei Simion wrote:
 We have installed the Gimp 2.4 and the swap file still grows. For 
 instance after generating 20,000 images, the swap file size is 2.5 GB.
 
 I will open a bug report so this issue won't get lost. What version of 
 GIMP 2.4 did you install? You can find the full version number (ie. 
 2.4.5) in the About GIMP box (under the help menu in the Toolbox).
 

2.4.4

Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp-Perl memory leak

2008-03-29 Thread Andrei Simion
Hi,

This is what you said:

quote
So you may have to free all tiles before the swap file
resizes itself to zero.
/quote

How can I free the tiles in the swap? That was the question.

If I show you a 20 lines script, then you'd have to generate the image 
maybe a million times to actually increase the swap. As Kevin said, 
there may be a leak in one of the method calls inside the script. And 
there are 104 calls.

Andrei

Sven Neumann wrote:
 Hi,
 
 On Sat, 2008-03-29 at 15:34 -0400, Andrei Simion wrote:
 
 I read that the tiles in the files should be empty in order to allow the 
 swap to resize itself. But how I can do that? Is there a method that 
 should be called after deleting the image?
 
 Sorry, but you obviously do not understand what I am trying to explain.
 It probably doesn't make sense to continue this discussion further.
 Please show us a small script that allows us to reproduce the problem
 and we will check if there's a problem in the GIMP code that needs to be
 solved.
 
 
 Sven
 

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] Gimp-Perl memory leak

2008-03-26 Thread Andrei Simion
Hi,

I run Gimp 2.2 on a Red Hat machine. The Perl scripts delete the images 
that are created by using gimp_image_delete. Even so, the swap file is 
created and it inflates significantly. For instance, after creating 250 
images its size is of 2.7 MB. If the image is not deleted in the script, 
then after the same amount of images created the size of the swap file 
is of 900 MB.

I would be interested in eliminating the swap file or at least limiting 
its size. I think it should resize itself, but this doesn't happen. Is 
there a setting in gimprc for this?

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] installing patterns

2008-03-17 Thread Andrei Simion
Hi,

I'd like to install some patterns in the Gimp version 2.0, the server 
version.

The manual says that the patterns should go in system patterns dir. This 
is one of the two locations.

Is this the location:

/usr/share/gimp/2.0/

If yes, then I can copy some old patterns from ver 1.2 and use them, 
right. In ver 1.2 they should be installed here:
/usr/share/gimp/1.2/

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] installing patterns

2008-03-17 Thread Andrei Simion
Hi,

No, I don't have 2 dirs. I have 2 machines: one running 1.2 and the 
other one 2.2.

So I guess I can safely copy the patterns from one server to the other. 
Actually the sys admin will do it as I don't have the necessarily rights.

Thanks,
Andrei

David Gowers wrote:
 Hi Andrei,
 
 Do you use GIMP 1.2 at all? If not, delete that second directory! it
 is irrelevant and is obviously the cause of your confusion.
 IIRC nothing changed about pattern fileformat between 1.x and 2.x, so
 you should be able to copy them across, yes :)
 
 Cheers,
 David
 
 
 On Tue, Mar 18, 2008 at 1:10 PM, Andrei Simion [EMAIL PROTECTED] wrote:
 Hi,

  I'd like to install some patterns in the Gimp version 2.0, the server
  version.

  The manual says that the patterns should go in system patterns dir. This
  is one of the two locations.

  Is this the location:

  /usr/share/gimp/2.0/

  If yes, then I can copy some old patterns from ver 1.2 and use them,
  right. In ver 1.2 they should be installed here:
  /usr/share/gimp/1.2/

  Thanks,
  Andrei
  ___
  Gimp-developer mailing list
  Gimp-developer@lists.XCF.Berkeley.EDU
  https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

 

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp_patterns_get_list

2008-03-12 Thread Andrei Simion
Thanks everybody for the answers.

Andrei

Sven Neumann wrote:
 Hi,
 
 On Mon, 2008-03-10 at 22:54 -0700, Bill Skaggs wrote:
 
 It's all at:

 http://developer.gimp.org/api/2.0/libgimp/index.html
 
 Please note that this is the API for plug-ins written in C. If you are
 accessing the PDB directly or by means of another language binding,
 there are (sometimes subtle) differences. I'd suggest to use the
 Procedure Browser instead. That gives you the raw procedures at least.
 
 
 Sven
 

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp_patterns_get_list

2008-03-12 Thread Andrei Simion
I checked in the procedure browser for gimp_patterns_get_list and found 
it is not supposed to get any compulsory parameters. There is an 
optional parameter, a regular expression string.

If the optional parameter is not provided, then no pattern is returned 
in the array. I passed the empty string and I got the list of available 
patterns.

I think this method is not properly documented in the procedure browser.

Andrei

Andrei Simion wrote:
 Thanks everybody for the answers.
 
 Andrei
 
 Sven Neumann wrote:
 Hi,

 On Mon, 2008-03-10 at 22:54 -0700, Bill Skaggs wrote:

 It's all at:

 http://developer.gimp.org/api/2.0/libgimp/index.html
 Please note that this is the API for plug-ins written in C. If you are
 accessing the PDB directly or by means of another language binding,
 there are (sometimes subtle) differences. I'd suggest to use the
 Procedure Browser instead. That gives you the raw procedures at least.


 Sven

 
 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
 

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp_patterns_get_list

2008-03-12 Thread Andrei Simion
The pattern descriptions I get from gimp_patterns_get_list are different 
from what I used in version 1.2. Now I am using ver 2.2 of Gimp.

The pattern descriptions I am using are like this: 't-12'. The new 
descriptions are in plain English: 'Crack', 'Paper' ...

I would need a mapping between the old descriptions and the new ones.

Thanks,
Andrei

Andrei Simion wrote:
 I checked in the procedure browser for gimp_patterns_get_list and found 
 it is not supposed to get any compulsory parameters. There is an 
 optional parameter, a regular expression string.
 
 If the optional parameter is not provided, then no pattern is returned 
 in the array. I passed the empty string and I got the list of available 
 patterns.
 
 I think this method is not properly documented in the procedure browser.
 
 Andrei
 
 Andrei Simion wrote:
 Thanks everybody for the answers.

 Andrei

 Sven Neumann wrote:
 Hi,

 On Mon, 2008-03-10 at 22:54 -0700, Bill Skaggs wrote:

 It's all at:

 http://developer.gimp.org/api/2.0/libgimp/index.html
 Please note that this is the API for plug-ins written in C. If you are
 accessing the PDB directly or by means of another language binding,
 there are (sometimes subtle) differences. I'd suggest to use the
 Procedure Browser instead. That gives you the raw procedures at least.


 Sven

 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

 
 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
 

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] gimp_patterns_get_list

2008-03-10 Thread Andrei Simion
Hi,

I have the following problem: when calling gimp_patterns_get_list on the 
Gimp server, version 2.2 I got an error:

not enough arguments for function 'gimp_patterns_get_list'

The function works on the Gimp server, version 1.2.

I checked here: http://hans.breuer.org/gimp/pdb/alphabetic.html and it 
appears I can call it with no parameters.

Can somebody point to the list of functions that can be used on Gimp 2.2?

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] fonts in gimp

2008-02-07 Thread Andrei Simion
Sven Neumann wrote:
 Hi,
 
 On Wed, 2008-02-06 at 20:26 -0500, Andrei Simion wrote:
 
 I have some Perl scripts that connect to a Gimp server and generate 
 images. I want to upgrade to the 2.2 version of Gimp and I know that I 
 have to change the font names. That's it, I pass a font to the script in 
 order to generate an image having a text on it. The question is if it is 
 a correspondence between the old font names (ver 1.2) and the one for 
 version 2.2.
 
 GIMP 2.x has some code that tries to come up with a good guess in case
 you are using the old font descriptions. This is used to interpret the
 parasites written by the old GIMP Dynamic Text plug-in. You could have
 look at that code (app/text/gimptext-xlfd.c).
 
 But I would suggest you just make yourself familiar with the X Logical
 Font Description (that is the old style) and the way that Pango font
 descriptions work. The string represensation used for fonts in Pango is
 explained at
 http://library.gnome.org/devel/pango/unstable/pango-Fonts.html#pango-font-description-from-string

Thanks, but I cannot find what I am looking for.

I need to get the list of font names that can be passed to the Gimp 
server, 2.2 version.

Let's say I want to pass this font 'FrutigerBold bold Italic normal'. 
What is the new format of this font for version 2.2 of Gimp.

Thanks,
Andrei

 
 
 Sven
 


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] fonts in gimp

2008-02-07 Thread Andrei Simion
Kevin Cozens wrote:
 Andrei Simion wrote:
 Let's say I want to pass this font 'FrutigerBold bold Italic normal'. 
 What is the new format of this font for version 2.2 of Gimp.
 
 Would you believe that it is simply FrutigerBold Bold Italic? Use the name 
 of the font followed by the style modifiers.

This is what we use and it worked fine with Gimp 1.2. version, but I've 
been told the font description has changed for 2.x versions.

 
 BTW, why are you upgrading to GIMP 2.2 version when GIMP 2.4 has been 
 released?
 

It has to do with the sys admin.

Thanks for the help.

Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] fonts in gimp

2008-02-06 Thread Andrei Simion
Hi all,

I have some Perl scripts that connect to a Gimp server and generate 
images. I want to upgrade to the 2.2 version of Gimp and I know that I 
have to change the font names. That's it, I pass a font to the script in 
order to generate an image having a text on it. The question is if it is 
a correspondence between the old font names (ver 1.2) and the one for 
version 2.2.

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] plug_in_tile

2005-07-25 Thread Andrei Simion

Hi,

I'm trying to use the plug_in_tile Perl method and I get no results.

I'm doing this:

$img = gimp_file_load($bgfile,$bgfile);
gimp_convert_rgb($img);

$layer = new Layer
$img,$width,$height,RGB_IMAGE,Foreground,100,NORMAL_MODE;

gimp_layer_add_alpha($layer);
gimp_image_add_layer($img,$layer,-1);
$layer - gimp_edit_clear;

($img2, $layer2) = plug_in_tile(0, $layer, $width, $height, 1);

In $img2 I should have the tiled image, but I got only an empty file.

What is your opinion?

Regards,
Andrei


___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] gimp swap file

2005-07-20 Thread Andrei Simion

Hi,

Sven Neumann wrote:


Hi,

Andrei Simion [EMAIL PROTECTED] writes:



Some time ago I reported a problem on the gimp server: more images I
create, the gimp ends up creating a swap file and this file increases
rapidly.

I was advised to install Gimp 2.x and I installed the 2.2 version. The
problem is the same, the swap file is still created and it still
increases in size. It means the Gimp server doesn't free the memory it
uses when creating an image.

Should I call a special method in the script that makes the image?



You are deleting the images, aren't you?


No, in all tutorials I read they return the image to be saved at the end 
of the main method in the script.


I tried to save the image from the script, not return it. It didn't work.



Andrei, there is really nothing we can do with the vague description
of your problem. I have asked you before to provide a documented test
case. Unless you do that, you shouldn't expect any further help.
Please stop wasting our time.


The script is very large, this is why I didn't send it to you. But, here 
it is:


#!/usr/bin/perl

use Gimp :auto;
use Gimp::Fu;

sub logov1 {
my($text, $font, $fontcolor, $outlinesize, $outlinecolor,
$shadowoffset, $shadowblur, $embossamount, $glowamount,
$bevelamount, $texture, $alignment, $bgfile, $logowidth,
$logoheight,$usebgdim,$textoffset,$vertoffset,$glowopacity,
$textureopacity,$buttontexture,$buttoncolor,$buttonstyle,
$backimage, $divider_above_size) = @_;


# comment by Andrei 03/27/2005
# log the $gimpcall into a file
open(LOG1, /home/gimp/gimp/logs/gimp_steve_pm.log);
print LOG1 $bgfile.\n;
close(LOG1);

if ($bgfile ne none) {
$img = gimp_file_load($bgfile,$bgfile);
} else {

print creating background with $buttontexture,$buttonstyle\n;
$backgroundcolor = #FF;
if ($backimage ne ) {
$backgroundcolorimage = gimp_file_load($backimage,$backimage);

	#	$backgroundcolor = 
gimp_color_picker($backgroundcolorimage,$drawable,1,1,1,0,0,1);

} else {
$backgroundcolor = #FF;
}

gimp_palette_set_background($backgroundcolor);

$img = gimp_image_new($logowidth,$logoheight,RGB);
$layer = 
gimp_layer_new($img,$logowidth,$logoheight,0,Background,100,0);
gimp_image_add_layer($img,$layer,0);
gimp_layer_add_alpha($layer);
gimp_selection_all($img);
gimp_drawable_fill($layer,BG_IMAGE_FILL);

	$buttonlayer = gimp_layer_new($img,$logowidth,$logoheight,0,Button 
layer,100,0);

gimp_image_add_layer($img,$buttonlayer,0);
gimp_layer_add_alpha($buttonlayer);
gimp_drawable_fill($buttonlayer,TRANS_IMAGE_FILL);
gimp_selection_none($img);

if ($buttonstyle =~ /round/i) {
# select elipse and rectangle added together for rounded button
	 
gimp_ellipse_select($img,$logowidth-$logoheight,0,$logoheight,$logoheight,0,1,0,0);


	gimp_rect_select($img,0,0,$logowidth - 
$logoheight/2,$logoheight,0,0,0);


print selecting ellipse  x = ;
print $logowidth-$logoheight . \n;


} else {
gimp_selection_all($img);
}

if ($buttonstyle =~ /outline/ ) {
gimp_palette_set_foreground(#00);
gimp_bucket_fill($buttonlayer,FG_IMAGE_FILL,0,100,0,0,0,0);
gimp_selection_shrink($img,2);
}

gimp_palette_set_foreground($buttoncolor);
gimp_bucket_fill($buttonlayer,FG_BUCKET_FILL,0,100,0,0,0,0);

#put on button texture if requested

if ($buttontexture ne none) {
$success = 0;
@pattern_list = gimp_patterns_list();
foreach $pattern (@pattern_list) {
		if ($pattern eq $buttontexture) { $success = 1; print \n\nsuccess 
[$buttontexure]\n\n; break; }


}

if ($success) {
gimp_patterns_set_pattern($buttontexture);

gimp_bucket_fill($buttonlayer,PATTERN_BUCKET_FILL,0,100,0,0,0,0);
plug_in_colorify($img,$buttonlayer,$buttoncolor);   


}
}
if (0) {

$success = 0;
@pattern_list = gimp_patterns_list();
foreach $pattern (@pattern_list) {
		if ($pattern eq $buttontexture) { $success = 1; print \n\nsuccess 
$buttontexure\n\n; break; }


}

if ($success) {

$textureimg = gimp_image_new($logowidth,$logoheight,GRAY);

		$texturelayer = 
gimp_layer_new($textureimg,$logowidth,$logoheight,GRAY_IMAGE,Texture 
layer,$textureopacity,0);
		$texturelayer2 = 
gimp_layer_new($img,$logowidth,$logoheight,RGB_IMAGE,Texture 
layer,$textureopacity,0);


gimp_drawable_fill($texturelayer,TRANS_IMAGE_FILL);
gimp_drawable_fill

Re: [Gimp-developer] gimp swap file

2005-07-20 Thread Andrei Simion

Hi,

Sven Neumann wrote:


Hi,

Andrei Simion [EMAIL PROTECTED] writes:



You are deleting the images, aren't you?


No, in all tutorials I read they return the image to be saved at the
end of the main method in the script.



So you are creating images and you never delete them. And it surprises
you that you are using up the available memory??


The situation is like this: I return the image at the end of the script. 
I tried to save the image, you can see this from the example I sent, but 
that method call doesn't work, I got an error. Could you please let me 
know what is wrong with the gimp_file_save call (it is currently 
commented out)?


If I return the image, I cannot delete it prior to returning and this is 
why I try to save it from inside the script.


Please have a look in the code I sent you and let me know what is wrong.

Regards,
Andrei




Sven


___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] gimp swap file

2005-07-19 Thread Andrei Simion

Hi,

Some time ago I reported a problem on the gimp server: more images I 
create, the gimp ends up creating a swap file and this file increases 
rapidly.


I was advised to install Gimp 2.x and I installed the 2.2 version. The 
problem is the same, the swap file is still created and it still 
increases in size. It means the Gimp server doesn't free the memory it 
uses when creating an image.


Should I call a special method in the script that makes the image?

Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] dynamic text

2005-07-11 Thread Andrei Simion

Hi,

Does anybody knows about the name of the GIMP Dynamic Text function in 
the Perl API? The name of the module is gdyntext.


Or, you know how can I get all the functions that are available in 
Gimp-Perl from the Unix shell or from Perl code?


Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] GIMP Dynamic Text

2005-07-10 Thread Andrei Simion

Hi,

Thanks for the update.

As long as it is not implemented yet, I'd like to use GIMP Dynamic Text.

Does anybody knows where I can find some documentation to use its Perl API?

Regards,
Andrei

Sven Neumann wrote:


Hi,

Andrei Simion [EMAIL PROTECTED] writes:



And there is other tool like GIMP Dynamic Text to work in Gimp 2.2? I
need basically to wrap the text when the line is bigger than the size
of the layer.



The new text tool will attempt to load GIMP Dynamic Text layers from
your old XCF files. It also provides multiline text. What it doesn't
provide yet, is the ability to specify a fixed layer width and have
the text broken wrapped into that. That is however planned.

Since I seem not to get around to implement it, perhaps someone else
wants to look into adding the missing pieces? Quite a bit of the
required functionality is already there, since this feature has always
been foreseen. What's missing is mostly the tool code. I haven't
looked at this in detail, but I think it should be possible to add
this by deriving the text tool from the new rectangle tool. If anyone
is interested, let me know. I will then try to explain the text
properties that exist for this purpose. I hope that the existing text
infrastructure will be capable of handling this feature w/o any
incompatible changes to the gimp-text parasite.


Sven
___
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] GIMP Dynamic Text

2005-07-08 Thread Andrei Simion



Owen Cook wrote:


On Fri, 8 Jul 2005, Andrei Simion wrote:



Sven Neumann wrote:


Andrei Simion [EMAIL PROTECTED] writes:



I'd like to use the below GIMP Dynamic Text with Gimp-Perl, but I
cannot find any documentation on it.


What is the below GIMP Dynamic Text?


Is this: http://registry.gimp.org/plugin?id=337




That is a Gimp-1.2 plug-in and if you are using Gimp-2.x?, it will not
work.


And there is other tool like GIMP Dynamic Text to work in Gimp 2.2? I 
need basically to wrap the text when the line is bigger than the size of 
the layer.


Thanks,
Andrei





Owen


___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] GIMP Dynamic Text

2005-07-07 Thread Andrei Simion

Hi,

I'd like to use the below GIMP Dynamic Text with Gimp-Perl, but I cannot 
find any documentation on it.


Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] GIMP Dynamic Text

2005-07-07 Thread Andrei Simion

Hi,

Sven Neumann wrote:


Hi,

Andrei Simion [EMAIL PROTECTED] writes:



I'd like to use the below GIMP Dynamic Text with Gimp-Perl, but I
cannot find any documentation on it.



What is the below GIMP Dynamic Text?


Is this: http://registry.gimp.org/plugin?id=337

Andrei

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] colors in Gimp

2005-06-30 Thread Andrei Simion

Hi all,

I have to pass some colors to Perl-Gimp script. In the 1.2 version of 
Gimp, passing the color hex like (#AABB00) was fine. In the 2.2 I tried 
to do the same but didn't work. I tried othe combinations but the result 
was the same:


Unable to grok '3d0603' as colour specifier at 
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Gimp/Fu.pm line 
218 (DIE)


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

2005-06-06 Thread Andrei Simion

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

2005-06-04 Thread Andrei Simion

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

2005-06-01 Thread Andrei Simion

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

2005-06-01 Thread Andrei Simion

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

2005-06-01 Thread Andrei Simion

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

2005-05-31 Thread Andrei Simion

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

2005-05-31 Thread Andrei Simion

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

2005-05-30 Thread Andrei Simion

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

2005-05-30 Thread Andrei Simion

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

2005-05-30 Thread Andrei Simion

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


[Gimp-developer] Re: Gimp server startup

2005-05-27 Thread Andrei Simion
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

2005-05-27 Thread Andrei Simion
 (cannot define its width)
# script_fu_addborder($img, $layer, 3, 3, #00, 1);

#$layer2 = gimp_layer_new($img, 725, 5, RGB, Layer 2, 0, 
NORMAL_MODE);

#gimp_image_add_layer($img, $layer2, -1);
#gimp_selection_all($img);
#gimp_layer_add_alpha($layer2);
#gimp_drawable_fill($layer2,FG_IMAGE_FILL);

# Set the background to the required color
# gimp_palette_set_foreground($color1);
# gimp_palette_set_background($color2);

# Paint the layer
#gimp_edit_fill($layer, BG_IMAGE_FILL);
#gimp_edit_fill($layer2, FG_IMAGE_FILL);

# delete the image
# gimp_image_delete($img);
# Return the image
return $img;
}

register
newimage2, # fill in name
Create a footer,  # a small description
gimp,   # a help text
Andrei Simion,# Your name
,# Your copyright
2005-04-17,  # Date
Toolbox/Xtns/Perl-Fu/Tutorial/newimage,   # menu path
*,   # Image types
[
 [PF_INT,   width,  Img width, 725],
 [PF_INT,  height,  Img height, 80],
 [PF_COLOR, bckg_color, background color, [255,0,0]],
 [PF_COLOR, fg_color, foreground color, [0, 0, 255]],
 [PF_INT, border_size,  Border size, 1],
 [PF_COLOR, border_color, border color, [0, 0, 255]],
 [PF_FONT,   font, font, 
-*-utopia-bold-r-*-*-70-*-*-*-*-*-*-*],

 [PF_INT, font_size,  Font size, 32],
 [PF_COLOR, font_color, Font color, [0, 0, 255]],
 [PF_INT, divider_above_size,  Divider above size, 1],
 [PF_INT, divider_above_width,  Divider above width, 100],
 [PF_COLOR, divider_above_color, Divider above color, [0, 
0, 255]],

 [PF_STRING,text,Text, some text],
 [PF_INT, divider_below_size,  Divider below size, 1],
 [PF_INT, divider_below_width,  Divider below width, 100],
 [PF_COLOR, divider_below_color, Divider below color, [0, 
0, 255]],

 [PF_INT, divider_offset,  Divider offset, 10]
],
\newimage;

exit main();

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


[Gimp-developer] Gimp server startup

2005-05-26 Thread Andrei Simion

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] wrapping the text

2005-04-25 Thread Andrei Simion
Hi,
Is there any GIMP Perl function that can perform the text wrapping.
Here is what I am doing: I write some text over an image, but when the 
text exceeds the width of the image, it is trimmed. So, I would like to 
write on a second, maybe third line too.

Regards,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-20 Thread Andrei Simion
Michael Schumacher wrote:
Well, lets clear it up:
- GIMP 1.2 is not longer maintained (even GIMP 2.0 isn't)
- there will be no changes to GIMP 1.2 anymore, and thus no further releases
- if you're still using 1.2, your're basically on your own
Compiling 2.2 yourself and testing it (if you don't have test cases, it
would be a good idea to make some up with the current setup) is the best
method to ensure it works fine. I'm actually a bit surprised that you'd rely
on others to test the software you're using - do you want to blame someone
else if it fails?
No. I'd only prefer to have a binary release for the OS I work on. Of 
course I'll compile and test it, but wouldn't be better if others would 
have tested it previously?

Anyway, I'd like to thank Manish for answering my questions.
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Hi,
Sven Neumann wrote:

You still didn't tell us what version of GIMP you are using. Looking
at your script makes me think it might be GIMP 1.2. At least the way
you select fonts is definitely an artefact from a script written for
GIMP 1.2.
Yes, it is GIMP 1.2.
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Thanks a lot!
Andrei
Sven Neumann wrote:
Hi,
Andrei Simion [EMAIL PROTECTED] writes:

You still didn't tell us what version of GIMP you are using. Looking
at your script makes me think it might be GIMP 1.2. At least the way
you select fonts is definitely an artefact from a script written for
GIMP 1.2.
Yes, it is GIMP 1.2.

GIMP 1.2 is not any longer supported (for quite a while already). Your
best bet is to update to GIMP 2.2. That will also give you the benefit
that you don't any longer need to run an X server with it.
Sven
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Hi,
Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your
best bet is to update to GIMP 2.2. That will also give you the benefit
that you don't any longer need to run an X server with it.
The problem is that 2.2 doen't work with Red Hat and we cannot change 
the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 
enough advanced to get rid of the problem with the swap file?

Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Manish Singh wrote:
On Tue, Apr 19, 2005 at 06:11:26PM -0400, Andrei Simion wrote:
Hi,
Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your
best bet is to update to GIMP 2.2. That will also give you the benefit
that you don't any longer need to run an X server with it.
The problem is that 2.2 doen't work with Red Hat and we cannot change 
the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 
enough advanced to get rid of the problem with the swap file?

2.2 works with Red Hat just fine. So I don't know what the issue is.
Just use 2.2.
At gimp.org they don't have downloads for 2.2. If you say it works, this 
is good. But why they don't say the same on the web site.

Thank you,
Andrei
-Yosh
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Carol Spears wrote:
On Tue, Apr 19, 2005 at 06:35:42PM -0400, Andrei Simion wrote:
At gimp.org they don't have downloads for 2.2. If you say it works, this 
is good. But why they don't say the same on the web site.

perhaps you could paste the url to where the web site suggested that you
download gimp-1.2?
http://gimp.org/unix/
Sorry for the confusion. They don't have 2.2 downloads that work with 
Red Hat. This is what I meant. Check out the link above.

Once again my appologies.
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Manish Singh wrote:
On Tue, Apr 19, 2005 at 06:35:42PM -0400, Andrei Simion wrote:
Manish Singh wrote:

On Tue, Apr 19, 2005 at 06:11:26PM -0400, Andrei Simion wrote:

Hi,
Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your
best bet is to update to GIMP 2.2. That will also give you the benefit
that you don't any longer need to run an X server with it.
The problem is that 2.2 doen't work with Red Hat and we cannot change 
the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 
enough advanced to get rid of the problem with the swap file?

2.2 works with Red Hat just fine. So I don't know what the issue is.
Just use 2.2.
At gimp.org they don't have downloads for 2.2. If you say it works, this 
is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be
a Red Hat. You can build from source on any Linux distro though.
It's not me the one who decides. If they haven't built and tested the 
2.2 on the older versions of Red Hat, then this solution is not 
acceptable for us.

Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-19 Thread Andrei Simion
Michael Schumacher wrote:
Andrei Simion wrote:

At gimp.org they don't have downloads for 2.2. If you say it works,
this is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be
a Red Hat. You can build from source on any Linux distro though.

It's not me the one who decides. If they haven't built and tested the
2.2 on the older versions of Red Hat, then this solution is not
acceptable for us.

Who are the they you are talking about? Just in case you didn't
notice, there are no binaries on gimp.org, all the links point to
external sites. No one from gimp.org explicitely tests GIMP on any
platform, except that the developers run it on their own platforms, of
course.
I haven't downloaded anything from gimp.org so I didn't know the 
binaries come from other entities. I haven't intended to be 
disrespectful; if so, please accept my apologies.

But let's go back to my problem. There's a swap file increase every time 
I run a Perl script that creates an image on the GIMP 1.2. I tried to 
delete the image at the end of my script, just to see if the swap file 
stops increasing. The result was negative. I cannot change the OS on the 
server (I have other services running) and everything should be tested. 
I have to stick on Red Hat.

The question is whether you have encountered such a problem (swap file 
increase).

I hope everything is clear now.
Thank you,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Gimp swap file increase

2005-04-18 Thread Andrei Simion
Hi,
Sven Neumann wrote:
Hi,
Andrei Simion [EMAIL PROTECTED] writes:

I have a problem with my Gimp server which runs on Linux. Every time I
create an image, the memory used by the Gimp increases. I tried to
delete the image at the end of the Perl subroutine that creates it,
but the memory usage still goes up and is never freed. As a result, I
have to restart the gimp server periodically.

If you can create a simple test case that shows the problem, we can
try to help you debugging it. So far you didn't even tell us what
version of GIMP you are using.
You are right. Here is the script:
#!/usr/bin/perl
use Gimp :auto;
use Gimp::Fu;
# create a footer image
sub newimage {
my ($width, $height,
$texture,
$color1, $color2,
$blend_direction, $blend_offset) = @_;
# Create a new image
$img = gimp_image_new($width, $height, RGB);
# Create a new layer
$layer = gimp_layer_new($img, 725, 125, RGB, Layer 1, 0, 
NORMAL_MODE);

# define the background colors
$backgroundcolor = #FF; # blue
$foregroundcolor = #FF; # red
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,BG_IMAGE_FILL);
# gimp_selection_border($img, 3);
#script_fu_addborder($img, $layer, 3, 3, #00, 100);
gimp_palette_set_background(#00);
# define first region
gimp_rect_select ($img, 0, 0, 725, 5, 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
gimp_rect_select ($img, 0, 120, 725, 125, 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, 5, 125, 2, 0, 0);
# fill the region
gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0);
# define the right lateral region
gimp_rect_select($img, 720, 0, 725, 125, 2, 0, 0);
# fill the region
gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0);
my $text = text;
my $font = qq{-*-agenda-medium-r-normal-*-24-*-*-*-*-*-*-*};
my $text_layer = gimp_text_fontname($layer, 0, 0, $text,
-1, #border
1, #antialias
48, #size
0, #size type
$font
);
# 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
my $text_layer = gimp_text_fontname($layer, $textx, $texty, $text,
-1, #border
1, #antialias
48, #size
0, #size type
$font
);
gimp_floating_sel_anchor($text_layer);
# draw the border (cannot define its width)
   # script_fu_addborder($img, $layer, 3, 3, #00, 1);
#$layer2 = gimp_layer_new($img, 725, 5, RGB, Layer 2, 0, 
NORMAL_MODE);
#gimp_image_add_layer($img, $layer2, -1);
#gimp_selection_all($img);
#gimp_layer_add_alpha($layer2);
#gimp_drawable_fill($layer2,FG_IMAGE_FILL);

# Set the background to the required color
# gimp_palette_set_foreground($color1);
# gimp_palette_set_background($color2);
# Paint the layer
#gimp_edit_fill($layer, BG_IMAGE_FILL);
#gimp_edit_fill($layer2, FG_IMAGE_FILL);
# delete the image
gimp_image_delete($img);
# Return the image
# return $img;
}
register
newimage2, # fill in name
Create a footer,  # a small description
for sitesell gimp project,   # a help text
Andrei Simion,# Your name
,# Your copyright
2005-04-17,  # Date
Toolbox/Xtns/Perl-Fu/Tutorial/newimage,   # menu path
*,   # Image types
[
 [PF_INT,   width,  Img width, 725],
 [PF_INT,  height,  Img height, 80],
 [PF_STRING,texture,Background Pattern, none],
 [PF_COLOR, color1, background color, [255,0,0]],
 [PF_COLOR, color2, Blend color, [0, 0, 255]]
],
\newimage;
exit main();
So, even though I delete the image, the swap file continues to increase.
You can solve the problem by restarting the Gimp server from time to 
time. But this is not an elegant way to solve the problem.

Andrei

Sven
___
Gimp-developer mailing list
Gimp

[Gimp-developer] Gimp swap file increase

2005-04-12 Thread Andrei Simion
Hi all,
I have a problem with my Gimp server which runs on Linux. Every time I 
create an image, the memory used by the Gimp increases. I tried to 
delete the image at the end of the Perl subroutine that creates it, but 
the memory usage still goes up and is never freed. As a result, I have 
to restart the gimp server periodically.

To delete the image I'm using gimp_image_delete. I also tried 
gimp_layer_delete, but I'm getting an error when I use it.

Am I missing something?
Thanks,
Andrei
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer