I can't load image from an ImageCached object on iOS.
I got an asset-library url from the ALAsset
but when I create the ImageCached object it d'ont show the image, ending with error that file is not found.
I take the image url from (ALAsset)asset.AssetUrl.AbsoluteString
Here is the bit of code that init my CachedObject
CachedImage image = new CachedImage();
image.Source = url;
image.HeightRequest = heightRequest;
image.WidthRequest = widthRequest;
image.DownsampleWidth = downSample;
image.CacheDuration = TimeSpan.FromDays(30);
image.LoadingPlaceholder = "Images/loading_grey.png";
image.ErrorPlaceholder = "Images/placeholder.png";
image.Transformations = new System.Collections.Generic.List<ITransformation>() {
new CropTransformation(1, image.Width / 2 - heightRequest, image.Height / 2 - widthRequest)
};
image.CacheType = FFImageLoading.Cache.CacheType.Disk;
image.GestureRecognizers.Add(new TapGestureRecognizer
{
Command = new Command(() => {
Navigation.PushModalAsync(new ViewImagePage(url));
}),
NumberOfTapsRequired = 1
});
return image;
From an another posts i got a trail with this when i browse my image
ImagesNames.Add(asset.DefaultRepresentation.Url.AbsoluteString);
But image Path just link to asset.JPG that doesn't point to the file