luberda-molinet / FFImageLoading

Image loading, caching & transforming library for Xamarin and Windows
MIT License
1.42k stars 377 forks source link

Xamarin.Forms support #28

Closed NVentimiglia closed 9 years ago

NVentimiglia commented 9 years ago

Being able to apply this to a XamarinForms Image or ImageSource would be nice. Heck, even if Success returned a byte[] would make my life easier.

molinch commented 9 years ago

@NVentimiglia that's something I'm also interested to have. In fact there is already a task for it: https://github.com/molinch/FFImageLoading/issues/11

That could be done pretty easily using a custom renderer.

NVentimiglia commented 9 years ago

I ended up coming up with my own solution. The solution included two classes. The first was a file cache which was responsible for catching the image as well as acquiring the image using HTTP client. The second class was a async image which inherited from grid. Internally I had a placeholder image as well as the instance image. Once dependency properties were set I would load the image using the file path in the background. And remove the placeholder image.

daniel-luberda commented 9 years ago

I created CachedImage - Image compatible renderer for Xamarin.Forms which uses FFImageLoading. Here: https://gist.github.com/daniel-luberda/f2381b736eb62afd238a

NVentimiglia commented 9 years ago

Nice, ill close the issue and look into migrating over.

daniel-luberda commented 9 years ago

Added PR https://github.com/molinch/FFImageLoading/pull/32