File
public struct File
A file type.
-
Create a File.
Declaration
Swift
public init(name: String, data: Data)Parameters
namethe name of the file.
datathe data of the file.
-
Create a File from a given image.
Declaration
Swift
init?(name: String, jpegImage: Image, compressionQuality: CGFloat = 0.9)Parameters
namethe name of the image.
jpegImagethe image, that would be converted to a JPEG data.
compressionQualityThe quality of the resulting JPEG image, expressed as a value from 0.0 to 1.0. The value 0.0 represents the maximum compression (or lowest quality) while the value 1.0 represents the least compression (or best quality). Default: 0.9.
-
Create a File from a given image.
Declaration
Swift
init?(name: String, pngImage: Image)Parameters
namethe name of the image.
pngImagethe image, that would be converted to a PNG data.
-
A helper function to create
File‘s from images in working thread.Declaration
View on GitHub
File Structure Reference