#2 Abstract resizeImage method