Skip to content

How do you add multiple animated gifs to a composite animated gif in different positions? #1483

Answered by JohnGoldInc
JohnGoldInc asked this question in Q&A
Discussion options

You must be logged in to vote

I was hoping this would work, but it doesn't make a valid gif:

  private static Image AddImage(Image original, Image additional, Point location, Size size, string filetype)
        {
            if (filetype == "gif")
                for (var f = 0; f < frames; f++)
                {
                    var currentFrame = original.Frames.CloneFrame(0);
                    if (original.Frames.Count() > f)
                        currentFrame = original.Frames.CloneFrame(f);

                    var add = additional.Frames.CloneFrame(f).Clone(x => x.Resize(size));

                    currentFrame.Mutate(x => x.DrawImage(add, location, 1));

                    if (original.Frames.Count > f…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
5 replies
@JimBobSquarePants
Comment options

@INeedADip
Comment options

@JimBobSquarePants
Comment options

Comment options

You must be logged in to vote
3 replies
@JimBobSquarePants
Comment options

@JohnGoldInc
Comment options

@JimBobSquarePants
Comment options

Answer selected by JohnGoldInc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants