[c++]base64编解码 and image

 

 

 

                                                //½«Í¼ÏñתΪbase64¸ñʽ
                                                vector<uchar> vecImg;                               //Mat ͼƬÊý¾Ýת»»Îªvector<uchar>  
                                                vector<int> vecCompression_params;
                                                vecCompression_params.push_back(CV_IMWRITE_JPEG_QUALITY);
                                                vecCompression_params.push_back(90);
                                                imencode(".jpg", out_roi_resize, vecImg, vecCompression_params);
                                                vector<int>().swap(vecCompression_params);
                                                std::string imgbase64 = base64_encode(vecImg.data(), vecImg.size());    //ʵÏÖͼƬµÄbase64±àÂë

 

 

1.

https://blog.csdn.net/sky04/article/details/6881649

2.

https://blog.csdn.net/wushuangge/article/details/80104152

3.

https://blog.csdn.net/tt_ren/article/details/53227900

 

posted on 2019-01-03 13:21  鹅要长大  阅读(329)  评论(0编辑  收藏  举报

导航