Table of Contents

Method AddGetSourceScreenshotRequest

Namespace
OBSStudioClient.Messages
Assembly
OBSClient.dll

AddGetSourceScreenshotRequest(SourceRef, string, int?, int?, int?, Guid?)

Adds a GetSourceScreenshot request to the batch.

public void AddGetSourceScreenshotRequest(SourceRef source, string imageFormat, int? imageWidth = null, int? imageHeight = null, int? imageCompressionQuality = null, Guid? canvasUuid = null)

Parameters

source SourceRef

The source to take a screenshot of, by name or by UUID.

imageFormat string

Image compression format to use. Use GetVersion to get compatible image formats.

imageWidth int?

Width to scale the screenshot to. Restrictions: >= 8, <= 4096. If omitted: Source value is used.

imageHeight int?

Height to scale the screenshot to. Restrictions: >= 8, <= 4096. If omitted: Source value is used.

imageCompressionQuality int?

Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use "default" (whatever that means, idk) Restrictions: >= -1, <= 100. If omitted: -1.

canvasUuid Guid?

UUID of the canvas the source is in, if the source is given by name.

Remarks

Gets a Base64-encoded screenshot of a source.

The imageWidth and imageHeight parameters are treated as "scale to inner", meaning the smallest ratio will be used and the aspect ratio of the original resolution is kept. If imageWidth and imageHeight are not specified, the compressed image will use the full resolution of the source.

**Compatible with inputs and scenes.**.