ExportableFormat
public enum ExportableFormat : ExportableFormatter
Enum definition of built-in exportable image raster formats
- bmp: https://en.wikipedia.org/wiki/BMP_file_format
- gif: https://en.wikipedia.org/wiki/gif
- jpg: https://en.wikipedia.org/wiki/jpeg
- png: https://en.wikipedia.org/wiki/Portable_Network_Graphics
- tiff: https://en.wikipedia.org/wiki/tiff
- wbmp: https://en.wikipedia.org/wiki/wbmp
- webp: https://en.wikipedia.org/wiki/webp
- any: Evaluates all of the above mentioned formats on export
-
Declaration
Swift
case bmp(compression: Bool)
-
Declaration
Swift
case gif
-
Declaration
Swift
case jpg(quality: Int32)
-
Declaration
Swift
case png
-
Declaration
Swift
case tiff
-
Declaration
Swift
case wbmp(index: Int32)
-
Declaration
Swift
case webp
-
Creates a data representation of given
gdImagePtr
.Throws
GDError
if export failed.Declaration
Swift
public 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 -
Declaration
Swift
init(_ imp: ImportableFormat)
-
Declaration
Swift
func fileExtension() -> String