batching Windows, GIMP stalls after 15 or so runs

batching Windows, GIMP stalls after 15 or so runs

Post by Branko Colli » Wed, 05 Mar 2003 04:55:27



I needed to convert some 500 images from black-and-white (and
intermediate greys) to red-and-white and red-and-orange. This is not
an interactive task, and is best done using a tool such as
ImageMagick, but I could not imagine how to do it in ImageMagick, so I
decided to use the GIMP for this batch job.

I wrote a Script-Fu with the following function:

(define (script-fu-bcrm infile outfile infg inbg outfg outbg)

(let*
  (
    (img (car (file-png-load 1 infile infile)))
    (drawable (car (gimp-image-active-drawable img)))
  )

  (gimp-convert-rgb img)
  (plug-in-color-map 1 img drawable infg inbg outfg outbg 0)
  (gimp-convert-indexed img 0 0 16 0 1 "")
  (file-png-save 1 img drawable outfile outfile 0 9 0 0 0 1 0)
  (gimp-image-delete img)
))

This function is called by another functions that runs through a list
of file names and passes them as arguments 'infile' and 'outfile'.

However, after running the function about 15 times, GIMP for Windows
hangs and I need to kill the program to restart it. Does anyone have
an idea as to why this happens? Is there anything I can do to measure
what goes wrong?

--
Real Men Don't Need Anaesthetics

 
 
 

batching Windows, GIMP stalls after 15 or so runs

Post by Uni » Wed, 12 Mar 2003 09:13:06



> I needed to convert some 500 images from black-and-white (and
> intermediate greys) to red-and-white and red-and-orange. This is not
> an interactive task, and is best done using a tool such as
> ImageMagick, but I could not imagine how to do it in ImageMagick, so I
> decided to use the GIMP for this batch job.

> I wrote a Script-Fu with the following function:

> (define (script-fu-bcrm infile outfile infg inbg outfg outbg)

> (let*
>   (
>     (img (car (file-png-load 1 infile infile)))
>     (drawable (car (gimp-image-active-drawable img)))
>   )

>   (gimp-convert-rgb img)
>   (plug-in-color-map 1 img drawable infg inbg outfg outbg 0)
>   (gimp-convert-indexed img 0 0 16 0 1 "")
>   (file-png-save 1 img drawable outfile outfile 0 9 0 0 0 1 0)
>   (gimp-image-delete img)
> ))

> This function is called by another functions that runs through a list
> of file names and passes them as arguments 'infile' and 'outfile'.

> However, after running the function about 15 times, GIMP for Windows
> hangs and I need to kill the program to restart it. Does anyone have
> an idea as to why this happens? Is there anything I can do to measure
> what goes wrong?

> --
> Real Men Don't Need Anaesthetics

I wish I could help, but this Script language looks too much like Lisp
and I never did like Lisp :-)

Good luck, however :)

Uni

 
 
 

1. Gimp-1.3.15 toolbox customize

I just built gimp-1.3.15 and installed it.

I want to customize my toolbox.  Remove some icons I don't use, and
add some I use a lot.

I have STFW for gimp toolbox customize and read the manuals I've found
to no avail.

Is it possible to do this (without hacking the source, smarty!)?  How?

2. Is this a good monitor.....

3. gimp-1.3.15 compilation problem

4. Moire patterns in scans?

5. Danger in running Multiscan 15 higher than 832x624

6. Jagged Edges

7. Networld show in Dallas runs October 13, 14 and 15

8. POV-Ray for Windows - update to beta 15 available

9. ADDENDUM REGARDING WINDOWS 15/16BIT COLOR MPEG VIEWER

10. *FS: WACOM 15 x 15 for Mac plus digitizer

11. Batching in windows

12. Running Gimp through a rlogin