ImportableFormat
public enum ImportableFormat : ImportableFormatter
Enum definition of built-in importable 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
- tga: https://en.wikipedia.org/wiki/Truevision_TGA
- wbmp: https://en.wikipedia.org/wiki/wbmp
- webp: https://en.wikipedia.org/wiki/webp
- any: Evaluates all of the above mentioned formats on import
-
Declaration
Swift
case bmp
-
Declaration
Swift
case gif
-
Declaration
Swift
case jpg
-
Declaration
Swift
case png
-
Declaration
Swift
case tiff
-
Declaration
Swift
case tga
-
Declaration
Swift
case wbmp
-
Declaration
Swift
case webp
-
Declaration
Swift
case any
-
Creates a
gdImagePtr
from given image data.Throws
GDError
if import failed.Declaration
Swift
public 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.