Getting an error when trying to convert sequence of jpgs to gifs. Can't seem to figure out how to add a palette, or if that's the actual problem. Was able to get gifs to load using the numpy arrays in the images2gif.py main.
import PIL
from PIL import Image
import StringIO
import images2gif
images = []
for frame in animation1.frames:
img_data = s3manager.get_file_as_string(frame.s3_filename)
image = Image.open(StringIO.StringIO(img_data))
images.append(image)
images2gif.writeGif('lala3.gif', images, duration=0.5, dither=0)
With this I get the following error:
"images2gif.py", line 436, in writeGifToFile
fp.write(globalPalette)
TypeError: must be string or buffer, not None
Not sure how to specify a palette for these jpgs. documentation unclear to me, and not even sure if that's the issue. help?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…