Advertisement
fbz

script fu for gimp, scheme, convert tif to indexed bmp

fbz
Oct 18th, 2011
674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.59 KB | None | 0 0
  1. ; script fu for gimp, scheme, convert tif to indexed bmp
  2.  
  3. (let* ((filelist (cadr (file-glob "/home/blah/foo/*.tif" 1))))
  4.   (while (not (null? filelist))
  5.     (let* (
  6.         (filename (car filelist))
  7.         (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
  8.         (drawable (car (gimp-image-get-active-layer image)))
  9.         )
  10.       (gimp-image-convert-indexed image 0 3 2 0 1 "")
  11.       (gimp-file-save 1 image drawable (string-append (substring filename 0 (- (string-length filename) 4)) ".bmp") (string-append filename ".bmp"))
  12.     )
  13.     (set! filelist (cdr filelist))
  14.   )
  15. )
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement