FFImageLoading 2.2 changes - please give us your opinion
We want to release 2.2 soon, it's a good occasion to do some changes.
- Is there any API refactoring necessary?
- Are there any library defaults that should be changed?
- Is there any feature you're missing?
- etc.
Feel free to give us your opinion.
Some my ideas:
- Transparency should be enabled by default for images loaded from application resources (Android specific) as this is a common usage scenario.
- better Transformations XAML support (Xamarin.Forms specific) - add properties to transformations.
- Windows transformations BitmapHolder optimization - it will force some modifications of existing custom transformations as BitmapHolder class will change. https://github.com/luberda-molinet/FFImageLoading/tree/windows-new-bitmapholder-optimization
Hi, thank you so much for your work. I am waiting for stable release so that I can use the preload method soon :) The only other thing I am wondering about is... I reuse grid cells for images and I notice that when the view loads, some of the old images appear briefly for a sec before the new images load. I am wondering, is the best situation to fix this issue is to add a placeholder image for LoadingPlaceholder? I am also thinking about clearing to cells by setting the images to null first before loading the new images. However, I am wondering if there's another way to do this.
This mostly happens with low/bad connectivity
What do you recommend? Thanks :)
+1
Is there a way to apply the transformations post aspect ratio fitting?
For example, I want to have 10pixel radius corners for my images, but since I've set AspectFill, the transformation gets aspect fitted as well.
is only partially related to this issue, but what i don't get.. how do we know which xamarin.forms version is this (or really any xamarin.forms pcl) build with/for?
i'm on forms 2.2.0.31 (latest stable at time of writing) and on android it just worked, installed via nuget -IncludePrerelease. on ios i get the exception "Could not load file or assembly 'FFImageLoading.Forms' or one of its dependencies".
from my earlier tinkering with your library i know i could probably get it to work by compiling the sources against forms 2.2.0.31 (though i haven't tried).
any help is greatly appreciated! not with making it work but understanding how to manage compatibility between referenced libraries as a dev.
@patook Two ways:
- Some of the transformations have alternative constructors which allow to set aspect ratio.
- You can use multiple transformations, so you could add
CropTransformationfirst (which lets you control size / aspect ratio), then another one, likeCircleTransformation.
@krisrok FFImageLoading 2.1 should work on any Xamarin.Forms version.
- You must include
CachedImageRenderer.Init()call in every platform specific project as stated here: https://github.com/luberda-molinet/FFImageLoading/wiki/Xamarin.Forms-API#important - Are you sure all nuget packages installed successfully? You should have Xamarin.FFImageLoading and Xamarin.FFImageLoading.Forms in every project (shared and platform specific). Also please try to uninstall all packages and add them again (sometimes XS have some packages issues)
@owlstack The solution is here:
- https://github.com/luberda-molinet/FFImageLoading/wiki/Xamarin.Forms-Advanced#usage-in-listview-with-listviewcachingstrategyrecycleelement-enabled
- https://developer.xamarin.com/guides/xamarin-forms/user-interface/listview/performance/#RecycleElement
@daniel-luberda Since you're asking for our feedback, is there any chance FFImageLoading can resolve the longstanding animated GIF problem with Xamarin? I would like nothing better than just put a CachedImage with Source = GIF file and have it play automatically.
@patook I think it's possible but it's quite a lot of work.
- Glide loader for Android supports it
- For iOS there's https://github.com/Flipboard/FLAnimatedImage
Maybe you could create an issue for that? On the other hand gif's are quite memory / resource hungry.
I upgraded from 2.0 to 2.1 and noticed that DownloadImageAndAddToDiskCacheAsync is missing. Is it possible to add it back for 2.2 or should I do something else?
We had to disable the fade animation as we load from cache. It was somewhat ugly to have that show up on every reload of the page for cached images.
@daniel-luberda I don't remember here: is @NVentimiglia 's feedback an issue or just a config parameter that we should most likely default to true?
@CliffCawley You should now use ImageService.Instance.xxx methods
@molinch I'm having an issue when I upgraded to 2.1.2, my images are cached loaded with a black background and some of the images are appearing in the wrong slots. This wasn't happening before with 2.1.0. So now the same images is loaded several times in a row even though it was not like so before. Did anything change?
@owlstack could you try the latest prerelase?
I can't use prelease for my project :( But I can try 2.1.3. waiting for a new stable release after PR. Btw, I forgot to mention, this only happens in a scrollview when swiping between pages.
it's not possible to give it a try? then bring back stable version?
ah ok, I will give it a try thanks :)
@molinch might be too early to say but so far, I tested with ver 2.1.3 and it seems to be working fine. I wonder what changed from 2.1.2 to 2.1.3? haha
@molinch It actual seems to happen intermittently. I will try the prerelease :S
EDIT: I tried the prerelease and it seems to be working fine (Further testing is needed of course). If possible, release a stable version soon :)
Thanks for your feedback @owlstack I'm waiting for @highplains too. If it's fine for both then we can release it.