I believe that the solution you are looking for here lies here (please do it right if I am wrong):
//Find the correct scale value. It should be the power of 2. final int REQUIRED_SIZE=70; int width_tmp=o.outWidth, height_tmp=o.outHeight; int scale=1; while(true){ if(width_tmp/2<REQUIRED_SIZE || height_tmp/2<REQUIRED_SIZE) break; width_tmp/=2; height_tmp/=2; scale*=2; }
This is from line 99 to line 108 here: https://github.com/thest1/LazyList/blob/master/src/com/fedorvlasov/lazylist/ImageLoader.java . I link this so that you can check the code from the source and compare with your code.
You will need to change this bit here: final int REQUIRED_SIZE= 70 . Please note that this number must have a power of 2 . By default, 70 you get small images, and when used in applications that need to display large images, they will look distorted. Play with it until you are satisfied with the result.
I personally use final int REQUIRED_SIZE=512 without any problems.
This should do the trick for you.
source share