JPGFormatter

private struct JPGFormatter : LibGdParametrizableFormatter

Defines a formatter to be used on JPEG import & export conversions

  • The parameters to apply on exports

    Declaration

    Swift

    fileprivate let exportParameters: Int32
  • Initializes a new instance of Self using given quality on exports For practical purposes, the quality should be a value in the range 0...95. For values less than or equal 0 or lower, the IJG JPEG quality value (which should yield a good general quality / size tradeoff for most situations) is used.

    Declaration

    Swift

    init(quality: Int32 = -1)

    Parameters

    quality

    Compression quality to apply on exports. Defaults to -1. See Reference

  • Function pointer to libgd’s built-in jpeg image create function

    Declaration

    Swift

    fileprivate let importFunction: (Int32, UnsafeMutableRawPointer) -> gdImagePtr?
  • Function pointer to libgd’s built-in jpeg image export function

    Declaration

    Swift

    fileprivate let exportFunction: (gdImagePtr, UnsafeMutablePointer<Int32>, Int32) -> UnsafeMutableRawPointer?