Added the ability to handle memory errors when allocating memory for bitmap operations. Tries a few attempts of scaling and quality degrading to get an image to fit in memory and within the device specific openGL texture limit.