Method AddSaveSourceScreenshotRequest
- Namespace
- OBSStudioClient.Messages
- Assembly
- OBSClient.dll
AddSaveSourceScreenshotRequest(SourceRef, string, string, int?, int?, int?, Guid?)
Adds a SaveSourceScreenshot request to the batch.
public void AddSaveSourceScreenshotRequest(SourceRef source, string imageFormat, string imageFilePath, 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.imageFilePathstringPath to save the screenshot file to. Eg.
C:\Users\user\Desktop\screenshot.png.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
Saves a screenshot of a source to the filesystem.
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.**.