The main functionality of class is the following: This control uses class for animating GIF. To solve the problem with playing animated GIFs I have created control derived from. You would probably want to convert all frames of the gif to BitmapSources as you load the gif file, and then cache them so you don't have to convert on each frame draw. I'd venture to guess that the conversion of a Drawing.Bitmap to BitmapSource is a fairly costly process. Unfortunately, I don't really have an idea how slow this would be. That information is of course stored in the gif file, but I'm not sure if you can obtain it through. The only thing I'm not sure of is how to determine how long you should pause between each frame. I would think you could leverage this to create a user control based on the WPF Image control and a timer. This thread shows how to convert a into a BitmapSource, which can be displayed in the WPF Image control: This article shows you how to enumerate through each frame in the animated gif file and obtain them as instances:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |