Is it possible to merge a image1.gift and image2.jpg with .net or javascript?

I want to merge two Images one of them is gif like this:
Is it possible to merge a image1.gift and image2.jpg with .net or javascript?

and other one is this:

Is it possible to merge a image1.gift and image2.jpg with .net or javascript?

Now I want put the second image in the gray box of first image. Is it possible to do that with .net or javascript?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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.

Code on github

ImageSharp:

Is it possible to merge a image1.gift and image2.jpg with .net or javascript?

GDI:

Is it possible to merge a image1.gift and image2.jpg with .net or javascript?

ImageSharp – no repeat:

Is it possible to merge a image1.gift and image2.jpg with .net or javascript?


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x