I am developing a live wallpaper, in which basically I am rotating around 80 frames (jpg images) - the image size is around 80KB each (800 x 1200 dimension) - total images folder size is around 6 MB.
The images loop fairly smoothly, but as soon as I scale the images (I am doing this to show images well in smaller screens) - the FPS goes for toss - any idea on how to scale the image effectively ?
I thought of two things initially - but it's not working well for me:
- I thought of putting all the scaled images in ArrayList of Bitmap, but it's giving a
VM Budget error
(tried to dobitmap.recycle()
too - but it's giving another error like,trying to use recycle image
). Any thought on this would be highly appreciated. - I though of putting scaled images in SD card - but again, don't know why but FPS is getting affected - otherwise this can be the best way where I can detect the size of the phone and can download the images over internet and put it in SD card. But, as I said even this didn't work well.
If anyone can help with either of these approaches, or can point to a better way - that should be awesome.