[Gimp-user] Scripted Gimp Protocol 1 error

2002-04-16 Thread As Signed

[EMAIL PROTECTED]

My ISP doesn't carry the gimp group and I tried posting via
mixmaster but nothing gets on.   Is the ng moderated and
dumping anon posts? 

Could anyone please help me get a perl script invoked from HTML 
via the local server run Gimp? 

I have one conventional perl script that invokes other progs.
I was hoping to also launch The Gimp from within this script 
and then have it return control to the calling script to continue 
with getting the images into an html page.

The only thing I've been able to do is a separate standalone
script launch The Gimp, do some graphics and save them to disk 
before quitting. Then I have to restart the original script
to carry on with loading the saved images.

Also, this standalone script must run from a bash shell or from
a directly commanded bash script. It refuses to run either from 
any script via local served html.

Is there something Gimp-specific that Apache (1.3.2) must have 
installed? I get server errors but not much in the logs which 
might suggest scripting syntax but Gimp has proven finicky enough 
to undermine this hunch.


I've tried commands  syntax like...

   system('/usr/..path/gimpit.pl');
   protocol error (1) at 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Gimp/Net.pm line 66.

   system('/usr/bin/gimp');
   Gtk-WARNING **: cannot open display: 

   system('/usr/bin/gimp-remote -n /usr/...path/test.png');
   Gtk-WARNING **: cannot open display: 

   ... the above 2 are less valuable as I DON'T want display.

   eval {
require(/usr/..path/gimpit.pl);
};
   ...nothing.

   printa href=/usr/..path/gimpit.plgimpit.pl/a;
   protocol error (1) at 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Gimp/Net.pm line 66.

   A bash script, otherwise able to launch gimpit.pl, invoked 
   from perl/html also results in
   protocol error (1) at 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Gimp/Net.pm line 66.

   which is here... (line #'s added for clarity)
63  # this is hardcoded into gimp_call_procedure!
64  sub response {
65 my($len,$req);
66 read($server_fh,$len,4) == 4 or die protocol error (1);
67 $len=unpack(N,$len);
68 read($server_fh,$req,$len) == $len or die protocol error (2);
69 net2args(0,$req);
70  }
   ...  a long long way over my head!  
   

Would appreciate any pointers.
Sorry if this is not exactly GIMP stuff, but the perl groups will
say it's not perl, and www will say it's apache... etc ;-) and who
would know better than Gimp users?


TIA  
 
[EMAIL PROTECTED]


The original (including needs) script structure
--
#!/usr/local/bin/perl
printContent-type:text/html\n\n;
printhtmlbody;
dothings;
  #nocando
  #dosomeGimpPerChance;
dosomeotherthings;
print/body/html;
exit;
sub dothings {
blah... blah
}
#sub dosomeGimpPerChance {
#blah... blah
#}
sub dosomeotherthings {
blah... blah
}



The standalone script structure
--
#!/usr/local/bin/perl
use Gimp qw (:auto);
use Gimp::Fu;
use Gimp::Util;
#Gimp::set_trace(TRACE_ALL);
register , , , , , , None, *, ,
\doit;
exit main();
  sub doit{
 blah.. NO show, only load, change  save.
  }
  $final=gimp_image_flatten($image);
  file_png_save($image, $final, $targp, $targp, 0,9,0,0,0,0,0);
  return ();
}
--
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



[Gimp-user] set_offset using pastEE image center?

2002-04-16 Thread As Signed

When using perl scripted commands such as

$throwaway2 = $background-edit_paste(0);
$throwaway2-set_offsets(290,345);
$throwaway2-anchor;


.. is there a way to have image placement be center-based,
like when one can set where the move-handle is with a brush 
in some other progs?

The paste will go into center if no offset is given, but
what I need is the pasted image to be centered on the
given co-ordinates.

I can do a bit by reducing x  y by 1/2 the image size but 
it's a pain and isn't exactly accurate with lopsided host 
and pasted images.


TIA
[EMAIL PROTECTED]

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user