Commit 7e065e0e authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

mln/io/pdf/load.hh: Check if the PDF can be rendered.

parent da8955a2
2013-03-01 Guillaume Lazzara <z@lrde.epita.fr>
* mln/io/pdf/load.hh: Check if the PDF can be rendered.
2013-03-01 Guillaume Lazzara <z@lrde.epita.fr>
 
Add test images.
......@@ -198,6 +198,12 @@ namespace mln
// Render Page
poppler::page_renderer pr;
if (! pr.can_render())
{
std::cout << "PDF cannot be rendered! Make sure libpoppler is "
<< "compiled with a render backend." << std::endl;
abort();
}
poppler::image pima = pr.render_page(p, dpi, dpi);
// Prepare MLN image.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment