简体   繁体   English

渐进式图像渲染,逐像素加载图像并更新imageLoader中的imageview

[英]Progressive Image Rendering, loading image pixel by pixel & updating imageview in imageLoader

I am working on an application where i need to load the server images in list. 我正在开发一个应用程序,我需要在列表中加载服务器映像。 But the way of displaying images is bit different. 但是显示图像的方式有点不同。 I need to display image as it gets downloaded ie pixel by pixel. 我需要在下载时显示图像,即逐个像素。 Initially the image sets as blur image than as it gets downloaded, its gets more sharper and results into the original image. 最初,图像设置为模糊图像,而不是下载,图像设置得更清晰,并且会产生原始图像。 If you want to see what i am talking about than you can refer to the below link: 如果你想看看我在说什么,你可以参考以下链接:

Progressive Image Rendering 渐进式图像渲染

In this you can see the demo of the superior PNG style two-dimensional interlaced rendering(the second one). 在这里你可以看到优质PNG风格的二维隔行渲染(第二个)的演示。 I goggled a lot but did not find any relevant answer to my query. 我g目结舌但没有找到任何相关的答案我的查询。

Any sort of help would be appreciable. 任何形式的帮助都是值得的。

Thanks in advance. 提前致谢。

If you use Glide, the library recommended by Google for loading images in Android, you can achieve this kind of behavior with .thumbnail this receives the fraction of the resolution you'll like your image to show while the full resolution finishes loading. 如果您使用谷歌推荐的用于在Android中加载图像的库,您可以使用.thumbnail实现此类行为,这将获得您希望图像在完整分辨率完成加载时显示的分辨率。

Glide.with( context )
         .load( "image url" )
         .thumbnail( 0.1f ) //rate of the full resoultion to show while loading
         into( imageView ); //ImageView where you want to display the image

Here is a more extensive explanation of the library and the thumbnails: https://futurestud.io/blog/glide-thumbnails 以下是对库和缩略图的更广泛说明: https//futurestud.io/blog/glide-thumbnails

试试Facebook的Freso项目: http ://frescolib.org/#streaming

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM