Swift: How to resize image using UIGraphicsImageRenderer but not add additional transparent surroundings
I currently have some code to resize big image down to screen size and keep aspect ratio to save memory usage as the loaded image could be huge. My current code is like this