ASCIITransform
public class ASCIITransform : Transform
Converts the image to black and white.
-
Initializes an
ASCIITransform
object.Declaration
Swift
public init()
-
Adds the
background
option.Declaration
Swift
@discardableResult func background(_ value: UIColor) -> Self
Parameters
value
Sets the background color to display behind the image.
-
Adds the
foreground
option.Declaration
Swift
@discardableResult func foreground(_ value: UIColor) -> Self
Parameters
value
Sets the foreground color to display behind the image.
-
Adds the
colored
option.Sets output as colored.
Declaration
Swift
@discardableResult func colored() -> Self
-
Adds the
size
option.Declaration
Swift
@discardableResult func size(_ value: Int) -> Self
Parameters
value
The size of the overlayed image as a percentage of its original size. Valid range:
10...100
-
Reverses the character set used to generate the ASCII output. Works well with dark backgrounds.
Declaration
Swift
@discardableResult func reverse() -> Self