Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 i.e. 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). I goggled a lot but did not find any relevant answer to my query.

Any sort of help would be appreciable.

Thanks in advance.

like image 779
patel Avatar asked Feb 03 '15 05:02

patel


People also ask

How to render images progressively in a web browser?

Images already render progressively in a web browser -- but you can do even better. Simply save your GIF or PNG images with the "interlaced" option, or your JPEG images with the "progressive" option. Stephan Lavavej has a great page outlining the difference between fancy interlacing and plain old progressive rendering :

What is progressive image loading and how to use it?

What is Progressive Image Loading Is a technique to smartly load the images of your app by demand, using small placeholders while the original image is being lazy loaded. When it finishes, do a soft transition from the placeholder to the original picture.

What is the difference between baseline and progressive images?

This is because the image loads from the top down and new lines of imagery load every few seconds. With progressive images users see the whole image partially-loaded. In an article for The Webmaster, Jonathan Griffin shared a great comparison of the two options (baseline on the left vs. progressive on the right) for images.

Why do people use interlaced or progressive images?

Some people like interlaced or “progressive” images, which load gradually. The theory behind these formats is that the user can at least look at a fuzzy full-size proxy for the image while all the bits are loading. In practice, the user is forced to look at a fuzzy full-size proxy for the image while all the bits are loading.


2 Answers

Try Facebook's Freso project: http://frescolib.org/#streaming

like image 172
Adam Avatar answered Sep 19 '22 09:09

Adam


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.

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

like image 43
Jose Gonzalez Avatar answered Sep 18 '22 09:09

Jose Gonzalez