FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

FFImageLoading 2.2 changes - please give us your opinion

Open daniel-luberda opened this issue 10 years ago • 24 comments

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.

daniel-luberda avatar May 15 '16 14:05 daniel-luberda

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

daniel-luberda avatar May 15 '16 14:05 daniel-luberda

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 :)

owlstack avatar May 15 '16 20:05 owlstack

+1

NVentimiglia avatar May 18 '16 06:05 NVentimiglia

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.

patook avatar May 25 '16 07:05 patook

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.

krisrok avatar May 25 '16 15:05 krisrok

@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 CropTransformation first (which lets you control size / aspect ratio), then another one, like CircleTransformation.

@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)

daniel-luberda avatar May 25 '16 15:05 daniel-luberda

@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 avatar May 25 '16 15:05 daniel-luberda

@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 avatar May 27 '16 00:05 patook

@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.

daniel-luberda avatar May 30 '16 21:05 daniel-luberda

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?

CliffCawley avatar Jun 02 '16 06:06 CliffCawley

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.

NVentimiglia avatar Jun 02 '16 18:06 NVentimiglia

@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?

molinch avatar Jun 08 '16 19:06 molinch

@CliffCawley You should now use ImageService.Instance.xxx methods

molinch avatar Jun 08 '16 19:06 molinch

@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 avatar Jun 08 '16 20:06 owlstack

@owlstack could you try the latest prerelase?

molinch avatar Jun 08 '16 20:06 molinch

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.

owlstack avatar Jun 08 '16 20:06 owlstack

it's not possible to give it a try? then bring back stable version?

molinch avatar Jun 08 '16 20:06 molinch

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

owlstack avatar Jun 08 '16 20:06 owlstack

@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 :)

owlstack avatar Jun 08 '16 21:06 owlstack

Thanks for your feedback @owlstack I'm waiting for @highplains too. If it's fine for both then we can release it.

molinch avatar Jun 09 '16 05:06 molinch