Gif are not animated when the BitmapImage is already downloaded when settting animation source
valhentai opened this issue · comments
Hi @valhentai,
Could you give more details on how to reproduce the issue?
I was wrong, it is not when image is already loaded. It happen when the BitmapImage is already downloaded.
if I do
ImageModule.BitmapImage.DownloadCompleted += (e, a) =>
{
ImageBehavior.SetAnimatedSource(image, ImageModule.BitmapImage);
};
There will be no animation. When I set the AnimatedSource when BitmapImage.IsDownloading is true, the animation will work.
I don't have this problem with XamlAnimatedGif but the animation is too slow with this library.
I got an AnimationLoaded event but GetAnimationController
return null. So I must reach this part of the code
WpfAnimatedGif/WpfAnimatedGif/ImageBehavior.cs
Lines 408 to 412 in 5e30f4e
My BitmapImage use a stream source and not a Uri so
must be false.
OK, so there seems to be multiple problems... Not sure where it's coming from. If you could provide a short but complete example that reproduces the issue, it would be very helpful.
I did some debbuging and in the end the problem didn't came from your library. My BitmapSource reference was changed so when I setted set animation source at different time I ended up setting a different source and one was corrupted.
I'm glad you were able to solve your problem. Thanks for letting me know!