Reputation: 310
I want to merge two Images one of them is gif like this:
and other one is this:
Now I want put the second image in the gray box of first image. Is it possible to do that with .net or javascript?
Upvotes: 1
Views: 252
Reputation: 82316
To answer the question - Yes ;)
OK, now how:
First, you need to find a way to read the gif image you have.
Example in C# here:
https://dejanstojanovic.net/aspnet/2018/march/getting-gif-image-information-using-c/
Then you probably need to take the GIF-Frame(s), and convert it into PNG, copy the the jpeg image at the correct location, then convert the png back to gif, and then create a new gif using https://github.com/mrousavy/AnimatedGif and set all the frames to the same time as in the original.
For JavaScript, there is libgif-js for the browser, and gif-encoder-2 from npm for NodeJS.
Or you can choose the batch route with ffmpeg.
ImageSharp:
GDI:
ImageSharp - no repeat:
Upvotes: 2