UIImage
extension UIImage
-
Compress the instance of the image.
Declaration
Swift
public func compressedImage(compressRatio: CGFloat, maxCompressRatio: CGFloat = 0.1) -> UIImageParameters
compressRatioRatio to use for compressing the image.
maxCompressRatioMaximum ratio where the image can be compress.
-
Redraw scaled down image respecting originally captured orientation settings.
Declaration
Swift
public func scaledDownImage(to size: CGSize) -> UIImage?Parameters
sizeReference size in scaling the image.
UIImage Extension Reference