I'm trying to load and resize and transform the image in the background while the application main data is loading. I need to do this because some of images are too big and I have a lot of them, so, I thing it's better to prepare all images before showing.
I execute this code in the background: Load the image from Uri:
ImageService.Instance.LoadUrl(uri, TimeSpan.FromDays(60))
.DownSample(100, 100, false).Preload();
Load the same image and apply additional transformation to it:
ImageService.Instance.LoadUrl(uri, TimeSpan.FromDays(60))
.DownSample(100, 100, false).Transform(BlurredTransformHere).Preload();
How I could reuse later the result from these cache queries in the CachedImage?
<forms:CachedImage
x:Name="Blured"
Aspect="Fill"
CacheType="All"
HorizontalOptions="Fill"
Opacity="0.3"
VerticalOptions="Fill"/>
<forms:CachedImage
x:Name="Normal"
CacheType="All"
Aspect="AspectFit"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
Should I add the same config parameters as in the query for each CachedImage? e.g. add DownsampleHeight&W and BlurredTransformation with the same parameters value?