A couple things...

1) you may not be actually loading the image for whatever reason.  This
wouldn't show up until you try to access it by its handle.

2) There's no guarentee that the just created image contains the active
drawable at all.  You should really do a @layers = $img->get_layers and
use $layers[0] instead.

3) It could be that something else is really causing the problem; 
difficult to see w/o the script.  It may be a deeper gimp problem too.

Hope this helps,
Seth Burgess

* Charles Brasted ([EMAIL PROTECTED]) [000404 08:37]:
> Doing some development of automating image processing.  I need some advice.
> I'm using gimp1.1.19/perl-Gimp1.1/glib1.2.7/gtk1.2.7 under RH 6.1.
> Basically I'm trying to convert the background colour of an image - there
> are loads of cool Gimp factory functions to do that, no problems.
> But, all the perl-gimp functions that do this need to act on a drawable, not
> an image, which is fair enough.  Problem is, I load the image, ie:
> $img = gimp_file_load(&Gimp::RUN_NONINTERACTIVE, $file, $file);
> works fine, but
> $drawable = gimp_image_active_drawable($img);
> fails.  This aint a reported bug...any ideas?
> Is there a better way to define a drawable for a loaded img?
> thanks.
> Charles

Reply via email to