question

raelisaac-5004 avatar image
0 Votes"
raelisaac-5004 asked Castorix31 edited

How do I create an animation from a series of bmp files (in dot net)

How do I create an animation from a series of bmp files in dot net? Suppose for example I want to show a cartoon, and I have the frames for it, each one in a bmp file. One way to do this within a program is just use a timer to show successive bitmaps. However, there are stand-alone animated images (like animated GIFs). If I could product one of those, for example, I could just email the animation to recipients, without sending a program to display it.
Any help is appreciated?

dotnet-visual-basic
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered Castorix31 edited

You can create an animated GIF with GifBitmapEncoder, but it won't be animated in loop in Web browsers because Metadata will be missing
For this, you can do it with IWICBitmapEncoder and IWICMetadataQueryWriter with P/Invoke
(tested on Windows 10 1909, but a bit complex...)


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.