UIImage
extension UIImage
-
To choe wether the target image size is in points or in pixels
See moreDeclaration
Swift
public enum ResizeMode
-
Resize an uiImage to the target size If onlyCompression, the size can be only decreased but not increased Mode: pixels or points. For example, for taget size 200*300, in pixels mode the result image has 200*300 pixels, in point mode on a 3x device the result image has 600*900 pixels (so 200*300 points on screen)
Declaration
Swift
public func resized(to target: CGSize, onlyCompression: Bool = true, mode: ResizeMode = .pixels) -> UIImage