# RtcImage (/zh-CN/api-reference/rtc/flutter/class-rtcimage)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="class_rtcimage__prototype"></a>

```dart
class RtcImage {
  const RtcImage(
      {this.url,
      this.x,
      this.y,
      this.width,
      this.height,
      this.zOrder,
      this.alpha});

  @JsonKey(name: 'url')
  final String? url;
  @JsonKey(name: 'x')
  final int? x;
  @JsonKey(name: 'y')
  final int? y;
  @JsonKey(name: 'width')
  final int? width;
  @JsonKey(name: 'height')
  final int? height;
  @JsonKey(name: 'zOrder')
  final int? zOrder;
  @JsonKey(name: 'alpha')
  final double? alpha;
  factory RtcImage.fromJson(Map<String, dynamic> json) =>
      _$RtcImageFromJson(json);
  Map<String, dynamic> toJson() => _$RtcImageToJson(this);
}
```

<a id="class_rtcimage__detailed_desc"></a>

用于设置直播视频的水印和背景图片的属性。

<a id="class_rtcimage__parameters"></a>

## 属性 [#属性]

<ParameterList>
<a id="url"></a>
<Parameter name="url">

直播视频上图片的 HTTP/HTTPS 地址。字符长度不得超过 1024 字节。

</Parameter>
<a id="x"></a>
<Parameter name="x">

图片在视频画面上的 x 坐标 (px)，以输出视频画面的左上角为原点。

</Parameter>
<a id="y"></a>
<Parameter name="y">

图片在视频画面上的 y 坐标 (px)，以输出视频画面的左上角为原点。

</Parameter>
<a id="width"></a>
<Parameter name="width">

图片在视频画面上的宽度 (px)。

</Parameter>
<a id="height"></a>
<Parameter name="height">

图片在视频画面上的高度 (px)。

</Parameter>
<a id="zorder"></a>
<Parameter name="zOrder">

水印或背景图的图层编号。使用水印数组添加单张或多张水印时，必须向 `zOrder` 传值，取值范围为 [1,255]，否则 SDK 会报错。其余情况，`zOrder` 可选传值，取值范围为 [0,255]，0 为默认值。0 代表图层的最下层，255 代表图层的最上层。

</Parameter>
<a id="alpha"></a>
<Parameter name="alpha">

水印或背景图片的透明度。取值范围为 [0.0,1.0]：

- 0.0: 完全透明。
- 1.0:（默认）完全不透明。

</Parameter>
</ParameterList>
