CIImage

public extension CIImage

Convertion between different image concepts

Author

Adamas

Date

16/09/2022

Version

1.9.8
  • CoreImage has a different coordinator system from what UIKit has. This is used to convert a rect from the UIKit coordinator system into the CoreImage one. CoreImage coordinator starts at the bottom-left corner. UIKit coordinator starts at the top-left corner. REF: https://nacho4d-nacho4d.blogspot.com/2012/03/coreimage-and-uikit-coordinates.html

    Declaration

    Swift

    static func ciRect(for rect: CGRect,
                       in superRect: CGRect) -> CGRect

    Parameters

    rect

    The rect in the UIKit system

    superRect

    The rect of the superview in the UIKit system, origin will be ignored

    Return Value

    A coverted rect in the CoreImage coordinator system