Made changes to Bitmap resizing and calculating inSampleSize