【问题标题】:FFImage - Very slow loading of User Photos (Xamarin Forms)FFImage - 用户照片的加载速度非常慢(Xamarin Forms)
【发布时间】:2018-06-22 12:18:00
【问题描述】:

我正在尝试使用 FFImage 加载从本地文件系统显示用户照片。我将这些照片显示在 FlowListView 中的“缓存图像”中,如下所示:

<DataTemplate>
<ffimageloading:CachedImage HeightRequest="100" Aspect="AspectFill"
                        DownsampleHeight="20" DownsampleUseDipUnits="false" 
                        Source="{Binding image}"/>

如您所见,我在 DownsampleHeight 20 处加载的图像非常小。但在我的 HTC Android 手机上,FFImage 大约需要 10 秒才能在我的 flowlistview 中加载单个图像。

这些照片大小约为 2-5 mb。我想我可以为每张图片创建一个 500 kb 的下采样副本,然后加载更高质量的版本

ImageService.Instance.LoadUrl(urlToImage).Success(() => ...

但是想知道是否有更好的方法,因为用户仍然需要等待大约 10 秒才能出现正确的图像......

【问题讨论】:

    标签: xamarin xamarin.forms xamarin.android photo-gallery ffimageloading


    【解决方案1】:

    在后端调整图片大小,节省用户流量和内存,不要使用 DownsampleHeight 等。

    【讨论】:

      猜你喜欢
      • 2018-05-02
      • 1970-01-01
      • 1970-01-01
      • 2017-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-09
      • 1970-01-01
      相关资源
      最近更新 更多