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.


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/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl

unless changed to (single lines) like
use lib
use lib

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.


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 {
    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

use Gimp qw (:auto);
use Gimp::Fu;
use Gimp::Net;
use Gimp::Util;

register "", "", "", "", "", "", "<None>", "*", "",


exit main();

  sub doit {
    $radians = 2 * 3.141592654 * $rotangle/360.0;
    $image1 = gimp_file_load($file1, $file1);
    # later down, do some like ....
    file_png_save($image, $final, $targr, $targr,
    # what you want from gimp
    return $final;
    print"<img src=$final>";
    return ();

Gimp-user mailing list

Reply via email to