Hello, I'm new to this list, joined on account of a nagging problem.
Web pages run through apache as local server are my favorite easy-interfaces for many utilities written in very rudimetary (clueless) perl over the years. They all work except a few involving gimp, which used to work with older versions though. I'm using Suse-11.1 (32 bit) on an amd64 machine with just about all related gimp (2.6.5) and perl (5.10) packages installed as far as I know. As I tried to 'reactivate' one of these scripts dormant for many years it refused to function. Looking at error messages has identified two immediate obstacles. 1 Script prepends like these do not work (neither web nor CLI) and I don't really know what they do exactly. use Gimp ":auto"; use Gimp::Fu; use Gimp::Net; use Gimp::Util; Can't locate Gimp.pm in @INC (@INC contains: /usr/lib/perl5/5.10.0/i586-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl unless changed to (single lines) like use lib '/usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi'; use lib '/usr/lib/perl5/site_perl/5.10.0/i586-linux-thread-multi/Gimp'; This one seems to have been provisionally dealt with thanks to a helpful soul on usenet who suggested the paths to use instead but I'd like to get it done right i.e. make it work without the workaround. 2 Old 'register' lines like register "", "", "", "", "", "", "<None>", "*", "", don't work and neither do newer versions found in examples on the net. Unquoted string "register" may clash with future reserved word at ..test.pl line xx., String found where operator expected at ..test.pl line xx, near "register, Exactly what does 'register' do? Do I even need to register if all I want is for gimp to load or produce an image, manipulate it soemewhat and then save it so the srcipt can load it and erase it after use? I don't need gimp to store the script for future use. A sample extract is pasted below (I prefer such simple layout/formats appropriate to my minimal perl abilities). #!/usr/local/bin/perl -w &doasub; exit; doasub { print "Said I: Hellow World"; print "World: !Bang!"; } As I understood it the sript assembles the instructions and finaly exits handing them over to gimp for execution. I'd really like to find a short sample that works so as to have a solid departure point at least. Thank you. --------------------------------- #!/usr/local/bin/perl -w print"Content-type:text/html\n\n"; use Gimp qw (:auto); use Gimp::Fu; use Gimp::Net; use Gimp::Util; register "", "", "", "", "", "", "<None>", "*", "", &doit; exit main(); sub doit { $file1="/srv/www/htdocs/user/magi/filez/source.png"; $rotangle=-238; $radians = 2 * 3.141592654 * $rotangle/360.0; $image1 = gimp_file_load($file1, $file1); # later down, do some like .... $background=gimp_rotate($background,0,$radians); $final=gimp_image_flatten($image); $targr="/srv/www/htdocs/user/filez/target.png"; file_png_save($image, $final, $targr, $targr, 0,9,0,0,0,0,0); # what you want from gimp return $final; print"<img src=$final>"; return (); } --------------------------------- _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user