Selecting a better value for sampleSize before decoding the image for both portrait and landscape