0

My project is Xamarin iOS project. I tried to load the image using ffimageloading nuget package using the below:

var fileURL = NSBundle.MainBundle.PathForResource("test", "webp");
ImageService.Instance.LoadFile(fileURL).Into(imageView);

I even used the other available methods like embeddedResource, LoadURL, LoadFileFromApplicationBundle but in vain.

None of the above work and the imageView is empty. The same code seems to work fine for any GIF/png filetype.

Thanks in advance.

Maddiee
  • 288
  • 2
  • 11

1 Answers1

0

After hours of struggle:

It can be done using the dependent library of ffimageloading called as WebP.Touch(1.0.8):

    WebP.Touch.WebPCodec decoder = new WebP.Touch.WebPCodec();
    var fileURL = NSBundle.MainBundle.PathForResource("imageName", "webp");
    return decoder.Decode(fileURL);

Hope it helps someone.

Maddiee
  • 288
  • 2
  • 11