Change resizeImage function to use screenWidth instead of screenHeight
 to better support use of isSquareMode