Unity and Windows API reference
Public 成员函数 | Public 属性 | 所有成员列表
ChatSDK.MessageBody.ImageBody类 参考
类 ChatSDK.MessageBody.ImageBody 继承关系图:
ChatSDK.MessageBody.FileBody ChatSDK.IMessageBody

Public 成员函数

 ImageBody (string localPath, string displayName, long fileSize=0, bool original=false, double width=0, double height=0)
 
- Public 成员函数 继承自 ChatSDK.MessageBody.FileBody
 FileBody (string localPath, string displayName="", long fileSize=0)
 

Public 属性

string ThumbnailLocalPath
 
string ThumbnaiRemotePath
 
string ThumbnaiSecret
 
double Height
 
double Width
 
bool Original
 
DownLoadStatus ThumbnaiDownStatus = DownLoadStatus.PENDING
 
- Public 属性 继承自 ChatSDK.MessageBody.FileBody
string LocalPath
 
string DisplayName
 
string Secret
 
string RemotePath
 
long FileSize
 
DownLoadStatus DownStatus = DownLoadStatus.PENDING
 
- Public 属性 继承自 ChatSDK.IMessageBody
MessageBodyType Type
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 ChatSDK.IMessageBody
static IMessageBody Constructor (string jsonString, string type)
 

详细描述

图片消息体。

构造及析构函数说明

◆ ImageBody()

ChatSDK.MessageBody.ImageBody.ImageBody ( string  localPath,
string  displayName,
long  fileSize = 0,
bool  original = false,
double  width = 0,
double  height = 0 
)

图片消息体构造方法。

参数
localPath图片的本地路径。
displayName图片的显示名称。
fileSize图片大小,单位为字节。
original是否发送原图。
width图片宽度,单位为像素。
height图片高度,单位为像素。

类成员变量说明

◆ ThumbnailLocalPath

string ChatSDK.MessageBody.ImageBody.ThumbnailLocalPath

缩略图的本地路径。

◆ ThumbnaiRemotePath

string ChatSDK.MessageBody.ImageBody.ThumbnaiRemotePath

缩略图在服务器上的保存路径。

◆ ThumbnaiSecret

string ChatSDK.MessageBody.ImageBody.ThumbnaiSecret

缩略图的下载密钥。

◆ Height

double ChatSDK.MessageBody.ImageBody.Height

图片文件的宽度和高度,单位为像素。

◆ Original

bool ChatSDK.MessageBody.ImageBody.Original

设置发送图片时是否发送原图。

  • true:发送原图。
  • (默认)false:若图片小于 100 KB,发送原图;若图片大于等于 100 KB, 发送压缩后的图片。 对于 Windows、Unity Mac 或 Unity Windows,SDK 暂不支持压缩功能,只支持原图发送。

◆ ThumbnaiDownStatus

DownLoadStatus ChatSDK.MessageBody.ImageBody.ThumbnaiDownStatus = DownLoadStatus.PENDING

图片的下载状态。