fix DPI mixup

librsvg defaulted to 90 DPI, but libvips to 72 DPI -- add a correction
factor

thanks Fosk!

see https://github.com/jcupitt/libvips/issues/688
This commit is contained in:
John Cupitt 2017-07-08 12:31:36 +01:00
parent 351dd67b62
commit 64fe910fc5
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,8 @@
12/6/17 started 8.5.7
- transform cmyk->rgb automatically on write if there's an embedded profile
and the saver does not support cmyk
- fix DPI mixup in svgload ... we were writing images about 20% too large,
thanks Fosk
19/5/17 started 8.5.6
- tiff read with start page > 0 could break edge tiles or strips

View File

@ -6,6 +6,8 @@
* - add svgz support
* 18/1/17
* - invalidate operation on read error
* 8/7/17
* - fix DPI mixup, thanks Fosk
*/
/*
@ -115,6 +117,11 @@ vips_foreign_load_svg_build( VipsObject *object )
if( !vips_object_argument_isset( object, "scale" ) )
svg->scale = svg->dpi / 72.0;
/* librsvg defaults to 90 DPI, but vips defaults to 72. We need to
* adjust the scale down.
*/
svg->scale *= 72.0 / 90.0;
if( VIPS_OBJECT_CLASS( vips_foreign_load_svg_parent_class )->
build( object ) )
return( -1 );