LibGdExportableFormatter

private protocol LibGdExportableFormatter : ExportableFormatter

Defines a formatter to be used on one of libgd built-in format with none-parametrizable export conversions

  • Function pointer to one of libgd’s build in image export functions

    Declaration

    Swift

    var exportFunction: (_ im: gdImagePtr, _ size: UnsafeMutablePointer<Int32>) -> UnsafeMutableRawPointer? { get }

Common Functions

  • data(of:) Extension method

    Creates a data representation of given gdImagePtr.

    Throws

    GDError if export failed.

    Declaration

    Swift

    fileprivate func data(of imagePtr: gdImagePtr) throws -> Data

    Parameters

    imagePtr

    The gdImagePtr of which a data representation should be instantiated.

    Return Value

    The (raw) Data of the image