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.

  • Generates thumbnails for multiple photo effects of the given size.

    Attention

    This method is deprecated and will be removed in the future. It is only meant for backward compatibility. Use generateThumbnails(for:of:singleCompletion:) instead.

    Declaration

    Swift

    @available(*, deprecated, renamed: "generateThumbnails(for:of:singleCompletion:﹚")
    @objc(generateThumbnailsForPhotoEffects:ofSize:singleCompletion:)
    func generateThumbnailsDeprecated(for photoEffects: [Effect], of size: CGSize, singleCompletion: @escaping ((_ thumbnail: UIImage, _ effect: Effect) -> Void))

    Parameters

    photoEffects

    The photo 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.