locked
Xamarin forms: Gif image is not working with FFimageloading in UWP RRS feed

  • Question

  • User351573 posted

    I am using FFImageLoading for playing a gif file in my project. It is working fine on android and ios but not working in UWP.

    I have added the following NuGet packages to every project in my solution.

    1. Xamarin.FFImageLoading.

    2. Xamarin.FFImageLoading.Forms.

    3. Xamarin.FFImageLoading.Transformations.

    4. Xamarin.FFImageLoading.Svg.

    5. Xamarin.FFImageLoading.Svg.Forms.

    Added the following code on UWP MainPage.xaml.cs:

    FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
    

    In XAML:

    xmlns:ffimageloading="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
    
    <ffimageloading:SvgCachedImage 
        HorizontalOptions="CenterAndExpand" 
        x:Name="GifImage" 
        Grid.Row="0"
        VerticalOptions="CenterAndExpand"
        WidthRequest="200"
        HeightRequest="200"
        Source="ic_dove_loading_xx.gif"/>
    

    Gif is not playing in the UWP app. Are there any additional settings in the windows part for UWP?

    Wednesday, February 12, 2020 5:47 AM

Answers

  • User351573 posted

    A solution from my SO thread.

    This is not available for UWP in my knowledge, Last time I checked it was an enhancement that was not added.

    When you check FFImageLoading's Github issues there is an open issue about this where the reason is explained by the Author.

    It's because FFImageLoading is using WriteableBitmap internally. We'll need to add a new logic to handle this and don't use WriteableBitmap for animated gifs.

    The good thing is that they have added this as a future enhancement for v2.5 which should be out soon!

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 12, 2020 6:18 AM