Re: [Gimp-developer] Perl server problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 02, 2001 at 12:54:23AM +0200, Sven Neumann <sven@xxxxxxxx> wrote:
> you are aware that there's a command-line option to control the stack-trace
> behaviour?

yes.

> I'd like to see your script or at least have a description of what it did

the inner loop was this (i cannot run it at the moment, though, since it
is part of a quite complex environment).

... for(many images)
       my $img = Gimp->file_load(($_)x2);
       $img->flatten;
       eval { $img->convert_grayscale };
       my $l = ($img->get_layers)[0];
       $l = $l->gimp_scale(1, 0, 0, $s+0.4, $s+0.4);
       $l->plug_in_c_astretch; 
       $l->width  == $s or die "$s <> ".$l->width;
       $l->height == $s or die "$s <> ".$l->height;
       my $pr = new PixelRgn $l, 0,0,$s,$s, 0,0;
       $pr = $pr->get_rect(0,0,$s,$s)->slice("(0)")->clump(2)->short;
       (($pr *= $b-1) += 127) /= 255; #/ # vim can't correctly hilight this :(
       $pr = $key->index($pr->list);
       $img->delete;

What it does is load an image, scale it down quite a bit and create a
spatial index key.

I can send you the whole script, but to make sense you would need to
massage it quite a bit. If I could have made it small and simple I would
have sent it in long ago ;)

> so we can try to debug the behaviour you are describing. Using memprof it
> should be possible to find your leaks.

yes :/

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


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux