RtcImage
Image properties.
public class RtcImage
{
public RtcImage()
{
url = null;
x = 0;
y = 0;
width = 0;
height = 0;
zOrder = 0;
alpha = 1.0;
}
public RtcImage(string url, int x, int y, int width, int height, int zOrder, double alpha)
{
this.url = url;
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.zOrder = zOrder;
this.alpha = alpha;
}
public string url { set; get; }
public int x { set; get; }
public int y { set; get; }
public int width { set; get; }
public int height { set; get; }
public int zOrder { set; get; }
public double alpha { set; get; }
}
Used to set the watermark and background image properties for live video.
Properties
- url
- HTTP/HTTPS address of the image on the live video. The character length must not exceed 1024 bytes.
- x
- The x-coordinate (in px) of the image on the video frame, with the top-left corner of the output video frame as the origin.
- y
- The y-coordinate (in px) of the image on the video frame, with the top-left corner of the output video frame as the origin.
- width
- The width (in px) of the image on the video frame.
- height
- The height (in px) of the image on the video frame.
- zOrder
- Z-order of the watermark or background image. When using an array of watermarks to add one or more watermarks, you must assign a value to
zOrder, with a valid range of [1,255], otherwise the SDK will report an error. In other cases,zOrderis optional, with a valid range of [0,255]. 0 is the default value. 0 represents the bottom layer, and 255 represents the top layer. - alpha
- Transparency of the watermark or background image. Value range is [0.0,1.0]:
- 0.0: Fully transparent.
- 1.0: (Default) Fully opaque.