EffectThumbnailRenderer

@available(iOS 9.0, *)
@objcMembers
@objc(PESDKEffectThumbnailRenderer)
open class EffectThumbnailRenderer : NSObject

A EffectThumbnailRenderer can be used to generate thumbnails of a given input image for multiple effects.

  • The input image that will be used to generate the thumbnails.

    Declaration

    Swift

    public let inputImage: UIImage
  • Creates a effect thumbnail renderer with the given input image.

    Declaration

    Swift

    public init(inputImage: UIImage)

    Parameters

    inputImage

    The input image that will be used to generate the thumbnails.

    Return Value

    A newly initialized EffectThumbnailRenderer object.

  • Generates thumbnails for multiple effects of the given size.

    Declaration

    Swift

    @objc(generateThumbnailsForEffects:ofSize:singleCompletion:)
    open func generateThumbnails(for effects: [Effect], of size: CGSize, singleCompletion: @escaping ((_ thumbnail: UIImage, _ effect: Effect) -> Void))

    Parameters

    effects

    The effects that should be used to generate thumbnails.

    size

    The size of the thumbnails.

    singleCompletion

    This handler will be called for each thumbnail that has been created successfully.