I wonder what social link I need to max to summon you at will!
Edit: Now I wonder, is .bmp the best format to save as? These tmx files have a lot of transparency in them after all. I guess I'll have to actually run the prog and see first.
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; any2pngbatch.scm
;; - By PersonaRipper, XaNTeX forums and http://tiredtracks.is-a-geek.com:8080/
;;
;; Used to run GIMP in batch mode and convert all .BMP(or other
;; graphic formats) to .png format.
;; To use:
;; Place this file in gimp's script folder and run the following command
;; in the desired folder.
;; gimp -i -b '(any2pngbatch "*.BMP")' -b '(gimp-quit 0)'
;;
;; Old files not removed. New files are the old filename with .png appended.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (any2pngbatch pattern)
(let*
((filelist (cadr (file-glob pattern 1)))) ;Get the file list.
(while (not (null? filelist)) ;Iterate the file list
(let* ( ; Set up variables for this iteration.
(filename (car filelist))
; Read the image data in.
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename filename)))
; Handle to the editable image
(drawable (car (gimp-image-get-active-layer image)))
(outputfile (string-append filename ".png")))
; Write out the new file.
(file-png-save RUN-NONINTERACTIVE
image drawable
outputfile outputfile 0 9 0 0 0 0 0)
(gimp-image-delete image))
; Move to the next element in the list.
(set! filelist (cdr filelist)))))