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
sourceSourceRefThe source to take a screenshot of, by name or by UUID.
imageFormatstringImage compression format to use. Use
GetVersionto get compatible image formats.imageWidthint?Width to scale the screenshot to. Restrictions: >= 8, <= 4096. If omitted: Source value is used.
imageHeightint?Height to scale the screenshot to. Restrictions: >= 8, <= 4096. If omitted: Source value is used.
imageCompressionQualityint?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.
canvasUuidGuid?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.**.