Contents

captureImage(contentFilter:configuration:completionHandler:)

Captures a single frame from a stream as an image, using a filter.

Declaration

class func captureImage(contentFilter: SCContentFilter, configuration config: SCStreamConfiguration, completionHandler: (@Sendable (CGImage?, (any Error)?) -> Void)? = nil)
class func captureImage(contentFilter: SCContentFilter, configuration config: SCStreamConfiguration) async throws -> CGImage

Parameters

  • contentFilter:

    The content filter used to select the stream.

  • config:

    Configuration information for how to capture the screenshot.

  • completionHandler:

    Closure that processes the screenshot taken from the streaming content.

See Also

Individual frame capture