RSS/Atom feed Twitter
Site is read-only, email is disabled

Writing gimp perl batch script

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Writing gimp perl batch script Michael Dingwall 30 Jul 22:44
  Writing gimp perl batch script Marc) (A.) (Lehmann 31 Jul 12:14
Writing gimp perl batch script Michael Dingwall 31 Jul 16:32
Michael Dingwall
2003-07-30 22:44:11 UTC (over 20 years ago)

Writing gimp perl batch script

Hi,

I've been working on getting a perl batch script written for gimp that will take the contents of a directory, pull out all of the pictures of a certain type and run some type of filter on them. So far everything works ok, until I try to loop the execution. here is the part that I'm having problems with:

for my $filename (@filelist) { $img = gimp_image_load($filename,$filename); $drw = gimp_image_active_drawable($img); plug_in_edge(1,$drw,8.7,2);
gimp_image_save(1,$drw,$filename,$filename); $img->delete;
}

This is the basic operations that I'm doing. For some reason on the second run of the loop, I start getting warnings like:

Subroutine Gimp::gimp_file_load redefined at /(path to Gimp.pm/Gimp.pm on line 541

The exectution will finish and the everything will come out as expected, however these warnings keep showing up. I've tried the trace mechanism and it crashes after the gimp_image_load statement.

Any help would be greatly appreciated.

Michael

Marc) (A.) (Lehmann
2003-07-31 12:14:02 UTC (over 20 years ago)

Writing gimp perl batch script

On Wed, Jul 30, 2003 at 03:44:11PM -0500, Michael Dingwall wrote:

Subroutine Gimp::gimp_file_load redefined at /(path to Gimp.pm/Gimp.pm on line 541

This is probably a bug in gimp-perl with the compatibility syntax. Could you try to use object-oriented syntax, i.e.

Gimp->file_image_load (... $img->active_drawable;
$img->file_save (...);

and tell me wether that works? thx.

however these warnings keep showing up. I've tried the trace mechanism and it crashes after the gimp_image_load statement.

Woaw. How does it crash (I can't reproduce that here)?

Michael Dingwall
2003-07-31 16:32:41 UTC (over 20 years ago)

Writing gimp perl batch script

===== Original Message From pcg@goof.com ( Marc) (A.) (Lehmann ) ===== On Wed, Jul 30, 2003 at 03:44:11PM -0500, Michael Dingwall

wrote:

Subroutine Gimp::gimp_file_load redefined at /(path to Gimp.pm/Gimp.pm on

line

541

This is probably a bug in gimp-perl with the compatibility syntax. Could you try to use object-oriented syntax, i.e.

Gimp->file_image_load (... $img->active_drawable;
$img->file_save (...);

Ok, all of this worked. However, when it comes to doing that with the plug_in_edge function I get an error telling me about a procedural database exection falure.

testloop.pl: plug_in_edge: procedural database execution failed at ./testloop.pl line 52

This time I'm gonna include the testloop.pl script that I wrote. Maybe with that it will help.

and tell me wether that works? thx.

however these warnings keep showing up. I've tried the trace mechanism and

it

crashes after the gimp_image_load statement.

Woaw. How does it crash (I can't reproduce that here)?

I guess that it reall doesn't crash, it hangs. Whenever using TRACE_ALL it hangs after the get_file_load command. With TRACE_CALL it hangs in the same place that I get the pdb error above.

--
-----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg@goof.com |e| -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | |

Thx for the help.

Michael