NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
v2::V2NIMStorageUtil类 参考

#include <v2_nim_utilities.hpp>

静态 Public 成员函数

static nstd::string imageThumbUrl (const nstd::string &url, int32_t thumbSize)
 获取图片缩略图
 
static nstd::string videoCoverUrl (const nstd::string &url, int32_t offset, int32_t thumbSize, const nstd::string &type)
 获取视频封面
 

成员函数说明

◆ imageThumbUrl()

nstd::string v2::V2NIMStorageUtil::imageThumbUrl ( const nstd::string url,
int32_t  thumbSize 
)
inlinestatic

获取图片缩略图

参数
url图片源地址
thumbSize缩略图尺寸,单位像素
返回
nstd::string
示例代码
auto thumbURL= V2NIMStorageUtil::imageThumbUrl("image_url", 100);
static nstd::string imageThumbUrl(const nstd::string &url, int32_t thumbSize)
获取图片缩略图
Definition: v2_nim_internal.hpp:240

◆ videoCoverUrl()

nstd::string v2::V2NIMStorageUtil::videoCoverUrl ( const nstd::string url,
int32_t  offset,
int32_t  thumbSize,
const nstd::string type 
)
inlinestatic

获取视频封面

参数
url视频源地址
offset视频封面偏移时间,单位秒
thumbSize封面尺寸,单位像素
type封面类型,如 png,jpeg
返回
nstd::string
示例代码
auto coverURL = V2NIMStorageUtil::videoCoverUrl("video_url", 0, 150, "png");
static nstd::string videoCoverUrl(const nstd::string &url, int32_t offset, int32_t thumbSize, const nstd::string &type)
获取视频封面
Definition: v2_nim_internal.hpp:243

该类的文档由以下文件生成: