Reputation: 5850
I'm working on an application in which I need to download lots of images. The images are to be seen in the fullscreen mode. Therefore, I wanted to know how to load an image, speedily, to make the application more responsive and enhance user experience. I would like to, atleast, show a blurred image first and than make it sharp. Thanks.
Upvotes: 2
Views: 2972
Reputation: 149
You're looking for "progressive image rendering", which can be done in a variety of different image formats, including png, jpeg, gif, etc. The next time you're going to save an image in a good graphics program, select one of those formats and take a look at your save options. You should have an option to save an "interlaced" image.
Jeff Atwood of Coding Horror has a nice write up here: http://www.codinghorror.com/blog/2005/12/progressive-image-rendering.html
Upvotes: 4
Reputation: 6929
use BitmapFactory.Options.inSamleSize to load a downsampled version of the image. Then load the bigger image and do a fade transition using a TransitionDrawable
Upvotes: 4