hello list, just added my self so i hope this is an active list.

im am attempting to batch compress OSM tile images. they are of png
format, otherwise i would have used cjpeg.
anyhow the script need only open the images in a folder and save them
out with a different compression level [9]

after reading the [1] batch mode page i have assembled this format:
 (define (png-compress filename
  (let* ((filelist (cadr (file-glob pattern 1))))
    (while (not (null? filelist))
           (let* ((filename (car filelist))
                  (image (car (gimp-file-load RUN-NONINTERACTIVE
                                              filename filename)))
             (gimp-file-png-save RUN-NONINTERACTIVE image drawable
filename filename))
             (gimp-image-delete image))
           (set! filelist (cdr filelist)))))

and run:
$ gimp -i -b '(png-compress "*.png" 9)' -b '(gimp-quit 0)'

but i get:
batch command: experienced an execution error.

got to say i really dont understand scripting all that much, i just
really need to compress these files.
thanks to anyone who can help me out here

[1] http://www.gimp.org/tutorials/Basic_Batch/
Gimp-user mailing list

Reply via email to