Image

class Image

An object representing an image bit map.

  • The name of the image.

    Declaration

    var name: String { get }
  • The dimensions of the image’s bounding box.

    Declaration

    var size: Size { get }
  • The object’s description

    Declaration

    var description: String { get }
  • Compares two values for equality.

    The equals function is invoked using infix notation as in the following code snippet: lhs == rhs.

    Declaration

    func equals(_ lhs: Image) -> Bool

    Parameters

    lhs

    A value.

    rhs

    Another value.

    Return Value

    true if the lhs and rhs are equal, false otherwise.

  • Serliazes the image into PNG data.

    Declaration

    func serializeAsPNGData() -> Data?

    Return Value

    The PNG data representing the image.

  • Serializes the image into a base 64 encoded string.

    Declaration

    func base64Encoded() -> String?

    Return Value

    A base 64 encoded string representing the image.