filestack/filestack-swift

View on GitHub
Sources/FilestackSDK/Public/Transforms/PixelateTransform.swift

Summary

Maintainability
A
0 mins
Test Coverage
//
//  PixelateTransform.swift
//  FilestackSDK
//
//  Created by Mihály Papp on 14/06/2018.
//  Copyright © 2018 Filestack. All rights reserved.
//

import Foundation

/// Pixelates the image.
public class PixelateTransform: Transform {
    // MARK: - Lifecycle

    /// Initializes a `PixelateTransform` object.
    public init() {
        super.init(name: "pixelate")
    }
}

// MARK: - Public Functions

public extension PixelateTransform {
    /// Adds `amount` option.
    ///
    /// - Parameter value: Valid range: `2...100`
    @discardableResult
    func amount(_ value: Int = 2) -> Self {
        return appending(key: "amount", value: value)
    }
}