I also don't think it can be paralleled easily since each frame needs to be rendered in sequence from the previous frame. However, if perhaps the animation has hundreds of frames, then it could be a bottleneck maybe? More testing needs to be done to assess whether or not optimisations are necessary. From what I tested, it seems to load instantly anyway, so there shouldn't be a need for drastic performance improvements. I assume you're referring to the process of preparing the frames. Check it out here.ĭo you have any idea how to improve the loading speed (parallelization, etc.)? This is a starting point, you'll have to improve it to make it more usable as a reusable control. I made a very basic GifImage control that you can start from. ImageTools is available only for Silverlight I wouldn't like to use SharpDX since it seems to be very complicated and I am a beginner. The problem is that the frames I get from the GIF image are messed upĪm I doing something wrong in this approach? What should I modify in order to get good results? PixelStream.Write(pixelData, 0, pixelData.Length) Var pixelData = pixelDataProvider.DetachPixelData() Var pixelDataProvider = await frame.GetPixelDataAsyncĭecoder.BitmapAlphaMode, new BitmapTransform(),ĮxifOrientationMode.IgnoreExifOrientation, Var writableBitmap = new WriteableBitmap((int)decoder.OrientedPixelWidth, Var frame = await decoder.GetFrameAsync(frameIndex) Var decoder = await BitmapDecoder.CreateAsync(stream) įor (uint frameIndex = 0 frameIndex < frameCount frameIndex++) It doesn't make any difference if I would use "BitmapDecoder.GifDecoderId" I don't specify the type since I would like to load other type of images also Using (var stream = await storageFile.OpenReadAsync()) Get the GIF frames using the BitmapDecoder class and animate them using a storyboard. This is not a solution since I want to display the images in a FlipView control (I cannot flip to another image). Until now, I have tried several approaches: I am trying to display a GIF file stored in a Windows Phone 8.1 ( RT) application's local folder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |