svg2png - avoid writing to an empty image
This commit is contained in:
parent
654a3c1f9f
commit
fd204874ec
1 changed files with 2 additions and 2 deletions
|
@ -90,8 +90,8 @@ struct main_marker_visitor
|
||||||
double svg_width = w * scale_factor_;
|
double svg_width = w * scale_factor_;
|
||||||
double svg_height = h * scale_factor_;
|
double svg_height = h * scale_factor_;
|
||||||
|
|
||||||
int output_width = static_cast<int>(std::round(svg_width));
|
int output_width = std::max(1, static_cast<int>(std::round(svg_width)));
|
||||||
int output_height = static_cast<int>(std::round(svg_height));
|
int output_height = std::max(1, static_cast<int>(std::round(svg_height)));
|
||||||
if (verbose_)
|
if (verbose_)
|
||||||
{
|
{
|
||||||
std::clog << "SVG width of '" << w << "' and height of '" << h << "'\n";
|
std::clog << "SVG width of '" << w << "' and height of '" << h << "'\n";
|
||||||
|
|
Loading…
Add table
Reference in a new issue