Image

open class Image : Hashable, Equatable

Represents an image. This class implements Hashable and Equatable.

  • Initializes a new instance of the Image class from the specified string.

    Declaration

    Swift

    public init(data: String)

    Parameters

    data

    A string that provides data for the new Image.

    Return Value

    The newly created Image object.

  • Initializes a new instance of the Image class from the specified CGImage.

    Declaration

    Swift

    public init(img: CGImage)

    Parameters

    img

    The CGImage that provides data for the new Image.

    Return Value

    The newly created Image object.

  • Gets the width of this Image.

    Declaration

    Swift

    open func getWidth() -> Int

    Return Value

    An integer, which is the width, in pixels.

  • Gets the height of this Image.

    Declaration

    Swift

    open func getHeight() -> Int

    Return Value

    An integer, which is the height, in pixels.

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Gets the CGImageRef for this Image.

    Declaration

    Swift

    open var image: CGImage