From: Cristy Date: Tue, 4 Oct 2016 16:16:03 +0000 (-0400) Subject: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30591 X-Git-Tag: 7.0.3-3~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8c6131b864418589f363771cd0b58622cdad3e7;p=imagemagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30591 --- diff --git a/coders/svg.c b/coders/svg.c index 16b37eea6..4da94931f 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -2981,13 +2981,13 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) if (error != (GError *) NULL) g_error_free(error); #if defined(MAGICKCORE_CAIRO_DELEGATE) - rsvg_handle_get_dimensions(svg_handle,&dimension_info); if (image_info->size != (char *) NULL) { (void) GetGeometry(image_info->size,(ssize_t *) NULL, (ssize_t *) NULL,&image->columns,&image->rows); if ((image->columns != 0) || (image->rows != 0)) { + rsvg_handle_get_dimensions(svg_handle,&dimension_info); image->resolution.x=90.0*image->columns/dimension_info.width; image->resolution.y=90.0*image->rows/dimension_info.height; if (image->resolution.x == 0) @@ -2999,8 +2999,9 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) image->resolution.x,image->resolution.y); } } - image->columns=image->resolution.x*dimension_info.width/90.0; - image->rows=image->resolution.y*dimension_info.height/90.0; + rsvg_handle_get_dimensions(svg_handle,&dimension_info); + image->columns=dimension_info.width; + image->rows=dimension_info.height; pixel_info=(MemoryInfo *) NULL; #else pixel_buffer=rsvg_handle_get_pixbuf(svg_handle);