Set and Retrieve Cropping Data
# Set and Retrieve Cropping Data
# Set Cropping Data
Path:
/api/setcutandscale
Method: POST
Content-type: application/json; charset=utf-8
API Description: This can be used to customize layer windows and crop windows with A100 and A200.
Notes:
- Custom cropping is only valid in sync mode (HDMI input) or when auto scaling is not enabled.
- The coordinate axis takes the upper-left corner of the screen as the origin, with the right direction as the positive x-axis and the downward direction as the positive y-axis.
- Apply only to the LED screens with port output. And the LED screens with HDMI output will not be affected.
- The cropping window must be within the HDMI input, namely, x>=0 && y>=0 && width<=HDMI width && height<=HDMI height.
- When you switch between sync/async mode, reseat the HDMI cable, reboot, or enable/disable scaling, the last cropping data will be applied if the HDMI signal (with the same width and height) is the same.
Request
Name | Type | Example | Description |
---|---|---|---|
srcWindow.left | int | 200 | X-coordinate of the upper left corner of the cropping window. |
srcWindow.top | int | 100 | Y-coordinate of the upper left corner of the cropping window. |
srcWindow.right | int | 500 | X-coordinate of the lower right corner of the cropping window. |
srcWindow.bottom | int | 250 | Y-coordinate of the lower right corner of the cropping window. |
destWindow.left | int | 0 | X-coordinate of the upper left corner of the layer. |
destWindow.top | int | 0 | Y-coordinate of the upper left corner of the layer. |
destWindow.right | int | 300 | X-coordinate of the lower right corner of the layer. |
destWindow.bottom | int | 150 | Y-coordinate of the lower right corner of the layer. |
videoSource | int | 0 as always | Video source. 0: HDMI input. |
Example
{
"srcWindow": {
"top": 100,
"left": 200,
"right": 500,
"bottom": 250
},
"destWindow": {
"top": 0,
"left": 0,
"right": 300,
"bottom": 150
},
"videoSource": 0
}
# Retrieve Cropping Data
Path:
/api/setcutandscale.json
Method: GET
Content-type: application/json; charset=utf-8
API Description: This can be used to read back layer windows and crop windows on A100 and A200.
Response
Name | Type | Example | Description |
---|---|---|---|
srcWindow.left | int | 200 | X-coordinate of the upper left corner of the cropping window. |
srcWindow.top | int | 100 | Y-coordinate of the upper left corner of the cropping window. |
srcWindow.right | int | 500 | X-coordinate of the lower right corner of the cropping window. |
srcWindow.bottom | int | 250 | Y-coordinate of the lower right corner of the cropping window. |
destWindow.left | int | 0 | X-coordinate of the upper left corner of the layer. |
destWindow.top | int | 0 | Y-coordinate of the upper left corner of the layer. |
destWindow.right | int | 300 | X-coordinate of the lower right corner of the layer. |
destWindow.bottom | int | 150 | Y-coordinate of the lower right corner of the layer. |
videoSource | int | 0 as always | Video source. 0: HDMI input; 1: DVI input. |
Example
{
"srcWindow": {
"top": 100,
"left": 200,
"right": 500,
"bottom": 250
},
"destWindow": {
"top": 0,
"left": 0,
"right": 300,
"bottom": 150
},
"videoSource": 0
}