[poppler] OpenCV and the image format in older versions of Poppler
Stéphane Charette
stephanecharette at gmail.com
Sun May 1 00:08:25 UTC 2022
I'm combining Poppler and OpenCV. I use poppler::page_renderer's call
set_image_format() so the image can easily be used in OpenCV. Code
more-or-less looks like this:
renderer.set_image_format(poppler::image::format_enum::format_bgr24);
poppler::image image = renderer.render_page(page, dpi, dpi);
cv::Mat mat(image.height(), image.width(), CV_8UC3, image.data(),
image.bytes_per_row());
But with older versions of Poppler (like what is included in Ubuntu
18.04: poppler 0.62.0) the call to set_image_format() does not exist.
What is the image format used by poppler in this case?
Stéphane
More information about the poppler
mailing list