在android中显示sd卡中的图像
我有一个应用程序需要显示保存在 SD 卡中的大约 50 个图像。每个图像文件都经过加密,大小为 600kb。因此,我需要先解密图像,然后再将其显示在图库小部件中。此加载需要花费大量时间(SD 卡读取时间 + 解密时间)。我想以有效的方式(更快)加载图像 我想到的解决方案类似于默认的 Android 画廊应用程序中的解决方案。在这里,当我们快速滑动图像时,它最初会显示图像的模糊版本。然后 1 或 2 秒后显示完整图像。我应该如何继续实现这种“增量图像加载”方式。有没有其他建议来解决这个问题
I have an application which needs to display around 50 images saved in the sd card.Each image file is encrypted and of size 600kb. So i will need to decrypt the image before showing it in a gallery widget.This loading is taking a large amuont of time(SD card read time + decryption time). I want to load the images in an efficient way(faster)
The solution I have in mind is something like that is there in the default android gallery application. Here when we swipe across images quickly, it will initially show a blurred version of the image.Then after 1 or 2 seconds the full image is shown. How should i go ahead to implement this way of 'incremental image loading'. Is there any other suggestion to solve this problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果图像已加密,则无法实现该操作。在图像完全解密之前,您无法了解有关数据的任何信息。
您可以做的是一次解密所有图像并缓存它们,这样您就不必每次都解密。
You can't implement that if the image is encrypted. You cannot know anything about the data until the image is fully decrytpted.
What you can do is decrypt all images at once and make a cache of them so you don't have to decrypt everytime.