UIImage

public extension UIImage

Join images into one

Author

Adamas

Date

08/05/2019

Version

1.5.0
  • Concat two images.

    Declaration

    Swift

    func concat(_ image: UIImage, with direction: ImageJoinDirection) -> UIImage?

    Parameters

    image

    The second image.

    direction

    Concat direction.

    Return Value

    The new image.

  • Get the size of a network image without loading it into the memory

    Declaration

    Swift

    static func sizeOfImage(at url: URL) -> CGSize?

    Parameters

    url

    The url representing where the image is .

    Return Value

    The size of the image. Nil if there is no image at the given URL.

  • Add blur effect to an image.

    Declaration

    Swift

    func addingGaussianBlur(withRadius radius: Int) -> UIImage

    Parameters

    radius

    The radius of the blur.

    Return Value

    The image with blur effect.

  • Add the opacity to the image.

    Declaration

    Swift

    func addingOpacity(_ opacity: Double) -> UIImage

    Parameters

    opacity

    The opacity.

    Return Value

    The image with opacity.

  • Crop an image into a square one.

    Declaration

    Swift

    func croppingSquare() -> UIImage

    Return Value

    The cropped image.

  • Compress an image with a maximum size provided.

    Declaration

    Swift

    func compressing(withMaxSize maxSize: Int) -> UIImage

    Parameters

    maxSize

    The max size of the new image.

    Return Value

    The compressed image.

  • Resize the image

    Declaration

    Swift

    func resizing(toWidth width: CGFloat, andHeight height: CGFloat) -> UIImage

    Parameters

    width

    The new width.

    height

    The new height.

  • Resize the image

    Declaration

    Swift

    func resizing(to size: CGSize) -> UIImage

    Parameters

    size

    The new size.