-1

I was wondering if there is any tool or if there is any way in order to take from a gif file, and save a file for each image.

This way I can get each frame separated in a file.

juan garcia
  • 1,326
  • 2
  • 23
  • 56

1 Answers1

1

Using python

A script made in python is available here:

import os
from PIL import Image


def extractFrames(inGif, outFolder):
    frame = Image.open(inGif)
    nframes = 0
    while frame:
        frame.save( '%s/%s-%s.gif' % (outFolder, os.path.basename(inGif), nframes ) , 'GIF')
        nframes += 1
        try:
            frame.seek( nframes )
        except EOFError:
            break;
    return True


extractFrames('ban_ccccccccccc.gif', 'output')

ban_ccccccccccc.gif is the name of your GIF image, and output the name of the folder were the frames will be saved.

Yuriko
  • 576
  • 3
  • 14