daily pastebin goal
64%
SHARE
TWEET

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

fbz Oct 18th, 2011 249 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top