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.
Name | Type | Required | Description | |
---|---|---|---|---|
sourceName |
String |
Name of the source to take a screenshot of | ||
imageFormat |
String |
Image compression format to use. Use GetVersion to get compatible image formats |
||
imageFilePath |
String |
Path to save the screenshot file to. e.g. C:\Users\user\Desktop\screenshot.png |
||
imageWidth |
Number |
Width to scale the screenshot to | >= 8, <= 4096 |
|
imageHeight |
Number |
Height to scale the screenshot to | >= 8, <= 4096 |
|
imageCompressionQuality |
Number |
Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use "default" | >= -1, <= 100 |
Name | Type | Description |
---|---|---|
obsRaw.imageData |
String |
Base64-encoded screenshot |
Complexity Rating: | |
Latest Supported RPC Version: | 1 |
Added in | v5.0.0 |
{
"requestType": "SaveSourceScreenshot",
"requestData": {
"sourceName": "",
"imageFormat": "",
"imageFilePath": "",
"imageWidth": ,
"imageHeight": ,
"imageCompressionQuality":
}
}