From 1e26b1a6c355f91dce6714a3c78f6d02620ee2fd Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 14 Sep 2017 16:03:21 +0200 Subject: [PATCH] vips_thumbnail: Fix SVG/PDF input (#735) --- libvips/resample/thumbnail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvips/resample/thumbnail.c b/libvips/resample/thumbnail.c index c10b511e..53d35a11 100644 --- a/libvips/resample/thumbnail.c +++ b/libvips/resample/thumbnail.c @@ -281,9 +281,9 @@ vips_thumbnail_open( VipsThumbnail *thumbnail ) } else if( vips_isprefix( "VipsForeignLoadPdf", thumbnail->loader ) || vips_isprefix( "VipsForeignLoadSvg", thumbnail->loader ) ) { - shrink = vips_thumbnail_calculate_common_shrink( thumbnail, + scale = 1.0 / + vips_thumbnail_calculate_common_shrink( thumbnail, thumbnail->input_width, thumbnail->input_height ); - scale = 1.0 / shrink; g_info( "loading PDF/SVG with factor %g pre-scale", scale ); }