Merge pull request #1459 from lovell/svgload-scale-rounding

Ensure SVG dimensions are rounded correctly when scaling or setting density via cairo
This commit is contained in:
John Cupitt 2019-11-20 15:49:53 +00:00 committed by GitHub
commit 933f8150f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.