Fixed OutOfMemoryError on image selection page, refactored image
decoding code so all pages use the correct approach.