#include "iBase64.h"
...
std::vector<unsigned char> data_encode;
cv::imencode(".png", img, data_encode);
std::string padded_img_buffer;
padded_img_buffer.assign(data_encode.begin(), data_encode.end());
EncodeBase64(reinterpret_cast<const unsigned char *>(padded_img_buffer.data()), img, padded_img_buffer.size());
base64图片编码
最新推荐文章于 2023-10-07 09:12:00 发布