imagemagick - Manipulating .gif animation with wand -
i'm working wand frame-by-frame translation of gif. want transpose image each frame of gif, save output animated gif.
def placeimage(gif_name, image_name, save_location): image(filename = gif_name) gif: image(filename = image_name) image: new_frames = [] frame_orig in gif_new.sequence: frame = frame_orig.clone() drawing() draw: draw.composite(operator='src_over', left=20, top=20, width=image.width, height=image.height, image=image) draw(frame) new_frames.append(frame)
so i've got of these frames (though they're not singleimage objects, image objects) i'd put , generate new gif. advice?
i'd able like:
with gif.clone() output: output.sequence=new_frames output.save(filename=save_location)
i answered similar here: resizing gifs wand + imagemagick
with image() dst_image: image(filename=src_path) src_image: frame in src_image.sequence: frame.resize(x, y) dst_image.sequence.append(frame) dst_image.save(filename=dst_path)
hope helps!
Comments
Post a Comment