LibGdImportableFormatter

private protocol LibGdImportableFormatter : ImportableFormatter

Defines a formatter to be used on one libgd built-in format import conversions

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

    Declaration

    Swift

    var importFunction: (_ size: Int32, _ data: UnsafeMutableRawPointer) -> gdImagePtr? { get }

Common Functions

  • imagePtr(of:) Extension method

    Creates a gdImagePtr from given image data.

    Throws

    GDError if import failed.

    Declaration

    Swift

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

    Parameters

    data

    The image data of which an image should be instantiated.

    Return Value

    The gdImagePtr of the instantiated image.