gpt4 book ai didi

android - 在 Android 中处理图像的正确方法?通过使用 Firebase

转载 作者:搜寻专家 更新时间:2023-11-01 09:20:01 25 4
gpt4 key购买 nike

我有 10,000 张全尺寸图片,所以每张图片大约 4MB。

我想通过使用 firebase storagedatabaserecyclerview 在 android 应用程序中显示图像。

我的问题是

情况 1。我必须在 Firebase 存储中保存缩小尺寸的图像吗?

情况 2. 我是否只将原始大尺寸图像保存在 Firebase 存储中并加载低质量的小尺寸图像?

我已经用 Glide 实现了案例 1。这不是问题。案例2呢?有用吗?

最佳答案

Case 1. Do I have to save reduced sized images in firebase storage?

这完全取决于你。你想保存原始文件或缩小图像。但请考虑以下事实。

  • 原始大小需要更多存储空间(阈值后的付费计划)
  • 更多服务器带宽将用于大图像
  • 用户的互联网数据。 (对于大图像会消耗更多数据)

Case 2. Do I just save original big sized images in firebase storage and loading low quality small sized images?

有两种情况

  1. 在 firebase 中,您需要存储两种类型的图像。 (缩略图和原始图像)。所以首先加载缩略图,如果用户选择下载。然后获取原始图像。
  2. 您可以在使用 Glide 或 Picasso 加载 View 时缩小图像,您可以轻松调整图像大小。

关于android - 在 Android 中处理图像的正确方法?通过使用 Firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56880154/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com