Ensure SVG dimensions are rounded correctly

when scaling or setting density via cairo
This commit is contained in:
Lovell Fuller 2019-11-01 18:26:51 +00:00
parent 7c5971392c
commit 894ec7db84
1 changed files with 2 additions and 2 deletions

View File

@ -280,8 +280,8 @@ vips_foreign_load_svg_parse( VipsForeignLoadSvg *svg, VipsImage *out )
* cairo instead.
*/
svg->cairo_scale = scale;
width = width * scale;
height = height * scale;
width = VIPS_ROUND_UINT( width * scale );
height = VIPS_ROUND_UINT( height * scale );
} else {
/* SVG with width and height reports correctly scaled
* dimensions.