1 Star 0 Fork 2

yanan/faceHttpd

forked from 樊智慧/faceHttpd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
image_base64.h 696 Bytes
一键复制 编辑 原始数据 按行查看 历史
樊智慧 提交于 2019-06-26 14:08 +08:00 . 提交
#ifndef TESTFACEAPI_TESTFACEAPI_IMAGE_BASE64_H
#define TESTFACEAPI_TESTFACEAPI_IMAGE_BASE64_H
#include <string>
// 对图片进行base64编码解码类
class ImageBase64
{
public:
/*编码
DataByte
[in]输入的数据长度,以字节为单位
*/
static const std::string encode(const unsigned char* Data, int DataByte);
/*解码
DataByte
[in]输入的数据长度,以字节为单位
OutByte
[out]输出的数据长度,以字节为单位,请不要通过返回值计算
输出数据的长度
*/
static const std::string decode(const char* Data, int DataByte, int& OutByte);
// 传入图片地址进行base64编码示例
static std::string file2base64(const std::string& file_path);
};
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/chukin007/faceHttpd.git
git@gitee.com:chukin007/faceHttpd.git
chukin007
faceHttpd
faceHttpd
20190718

搜索帮助