如何将'opencv :: Mat'转换为'podofo :: PdfImage'?

时间:2019-05-07 07:12:08

标签: image opencv podofo

我不知道如何将opencv::Mat转换为podofo::PdfImage或如何解决崩溃。我很困惑。

我的代码:

// Mat img
// ...do something to init 'img'...
int image_size = img.cols * img.rows;
unsigned char* outBuffer = new unsigned char[image_size];
memcpy(outBuffer, sub_img[0].data, image_size);
//imwrite(".\\71253_0_0.png",img); // can be saved and displayed correctly

PdfImage pdfimg( &document );
pdfimg.LoadFromData(img.data,image_size); **//cause a crash**

0 个答案:

没有答案