Talk:Blender 3D: Noob to Pro/Creating animated GIFs using Blender and Gimp

A ScriptFu script for importing all (or some) pictures as layers

(define (addJPGAsLayer image directory pattern max)  (let* ((patPictures  (file-glob (string-append directory "\\*" pattern)  0))         (files  (cadr patPictures))         (tel (min max (car patPictures)))         (layer 0)         (filename "")) (while (and (> tel 0) (< tel (+ max 1)))      (set! filename (car files))     (set! files (cdr files))     (set! layer (car (gimp-file-load-layer 1 image filename)))     (gimp-image-add-layer image layer -1)      (set! tel (- tel 1)))))
 * debug help   (gimp-message (number->string tel))

(script-fu-register "addJPGAsLayer"  _"/Xtns/Script-Fu/PKHG/AddPicturesAsLayer"   "Add pictures as layer to a picture (max from one directory)"   "copyright PKHG"   "PKHG"   "18-3-2009"   "RGB* GRAY* INDEXED*"   SF-IMAGE "The Image" 0   SF-DIRNAME "Directory" "c:/tmp"   SF-STRING "Pattern" "*.jpg"   SF-VALUE "Max Images" "10" )

Maybe it should be copied to the the page?

some Gimp notes
Opening the initial image before opening the rest as layers is an unnecessary step. Gimp's "open as layers" will work just as well without having a document open to start with.

Repeating the "open as layers" for each image is also unnecessary, even if you're not choosing to open all. Ctrl + click will select specific images within a directory, and Shift + click will select a contiguous block of files.

"Filters->Animation->Optimize for GIF" is a valuable step for reducing the size of your file, as it removes pixels that are reused in sequential frames. This step creates a copy of the file.

GIF files use an indexed color palette, so it's handy to convert to indexed (Image->Mode->Indexed) before saving the animation. This is not necessary, since Gimp automatically does a conversion when saving as GIF, but doing the conversion yourself gives greater control of how the conversion is done. You can set the number of colors to use as well as the dithering method, and if it ends up too crunchy just undo and try again with different settings.

Mikshaw (discuss • contribs) 00:31, 2 April 2011 (UTC)

better ways than gimp
May be there exists another article for that but would it not be better to use ImageMagick (Windows and Linux) to do the job instead of gimp?

e.g.: convert -delay 5 *.png out.gif

92.193.65.5 (discuss) 22:19, 7 August 2012 (UTC)