FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

CircleTransformation (and maybe others) not always applied

Open patook opened this issue 10 years ago • 3 comments

I am getting an error where sometimes the circletransformation doesn't get applied.

It works 99% of the time but 1% of the time the same image is square. Is there any reason why this would happen with such low probability? Is the transformation done on a separate thread or something?

UserProfileImage = new CachedImage { HeightRequest = 120, WidthRequest = 120, Aspect = Aspect.AspectFill, HorizontalOptions = LayoutOptions.Center, Source = "https://patook.com/Content/ProfileWoman.jpg", Transformations = new System.Collections.Generic.List<FFImageLoading.Work.ITransformation>() {

                new FFImageLoading.Transformations.CircleTransformation(),
            },
        };

patook avatar Jun 24 '16 22:06 patook

When this happens it means that the transformation could not be applied. Instead of crashing we revert to the previous image (pre transformation).

Why a transformation could not be applied? You are low on memory, some Android/Xamarin issue, a bug in your app, a bug in our lib, ... It is impossible to say.

molinch avatar Jun 25 '16 08:06 molinch

We are 3 Developers 2 with Xamarin for OSX and 1 with VisualStudio. Never work, (emulator or real device). You should fix the issue or we uninstall it, because we can´t round images with other libraries.

jposes22 avatar Jul 11 '16 13:07 jposes22

@jposes22 It definitely works. Clone FFImageLoading project and run the demo project, you'll see that it works correctly. The important thing is to set Transformations before Source property, not the opposite. Also don't forget to read this: https://github.com/luberda-molinet/FFImageLoading/wiki/Xamarin.Forms-API

daniel-luberda avatar Jul 11 '16 13:07 daniel-luberda