From: dirk Date: Thu, 2 Jan 2014 08:14:54 +0000 (+0000) Subject: Dpi fix. X-Git-Tag: 7.0.1-0~3009 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8355e65759dd2b84d0b1efe200fd0ac115ef2812;p=imagemagick Dpi fix. --- diff --git a/coders/svg.c b/coders/svg.c index a0828168c..6cf62e0a0 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -2918,8 +2918,9 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) if (svg_handle == (RsvgHandle *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); rsvg_handle_set_base_uri(svg_handle,image_info->filename); - rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x, - image->resolution.y); + if ((image->resolution.x != 90.0) && (image->resolution.y != 90.0)) + rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x, + image->resolution.y); while ((n=ReadBlob(image,MaxTextExtent,message)) != 0) { error=(GError *) NULL; @@ -2933,8 +2934,8 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) g_error_free(error); #if defined(MAGICKCORE_CAIRO_DELEGATE) rsvg_handle_get_dimensions(svg_handle,&dimension_info); - image->columns=image->resolution.x*dimension_info.width/72.0; - image->rows=image->resolution.y*dimension_info.height/72.0; + image->columns=image->resolution.x*dimension_info.width/90.0; + image->rows=image->resolution.y*dimension_info.height/90.0; pixel_info=(MemoryInfo *) NULL; #else pixel_buffer=rsvg_handle_get_pixbuf(svg_handle);