Filestack Documentation

Class ASCIITransform

public class ASCIITransform: Transform  

Converts the image to black and white.

ASCIITransform ASCIITransform Transform Transform ASCIITransform->Transform

Superclass

Transform

:nodoc:

Initializers

init()

public init()  

Initializes an ASCIITransform object.

Methods

background(_:​)

@discardableResult
    func background(_ value: UIColor) -> Self  

Adds the background option.

Parameters

value UIColor

Sets the background color to display behind the image.

foreground(_:​)

@discardableResult
    func foreground(_ value: UIColor) -> Self  

Adds the foreground option.

Parameters

value UIColor

Sets the foreground color to display behind the image.

colored()

@discardableResult
    func colored() -> Self  

Adds the colored option.

Sets output as colored.

size(_:​)

@discardableResult
    func size(_ value: Int) -> Self  

Adds the size option.

Parameters

value Int

The size of the overlayed image as a percentage of its original size. Valid range: 10...100

reverse()

@discardableResult
    func reverse() -> Self  

Reverses the character set used to generate the ASCII output. Works well with dark backgrounds.