UIImage+Resize: Resizing an UIImage
With this UIImage extension you will be able to resize an UIImage to any size using a CGSize structure with width and height values as a parameter.
In some contexts it might be necessary to quickly resize an image to meet certain requirements, e.g. optimizing memory footprint when displaying images at actual sizes or when providing image data as input for a Core ML model.
When using UIImage fore the image data, the image can be conveniently resized with the following UIImage+Resize extension by providing width and height values as input parameters suing a CGSize structure.
Become a free member or log in to proceed.