if (svg_handle == (RsvgHandle *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
rsvg_handle_set_base_uri(svg_handle,image_info->filename);
- if ((image->resolution.x != 90.0) && (image->resolution.y != 90.0))
+ if ((image->resolution.x > 0.0) && (image->resolution.y > 0.0))
rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x,
image->resolution.y);
while ((n=ReadBlob(image,MagickPathExtent-1,message)) != 0)
if (error != (GError *) NULL)
g_error_free(error);
#if defined(MAGICKCORE_CAIRO_DELEGATE)
- if (image_info->size != (char *) NULL)
+ if ((image->columns == 0) || image->rows == 0))
{
- (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);
- if (dimension_info.width != 0)
- image->resolution.x=90.0*image->columns/dimension_info.width;
- if (dimension_info.height != 0)
- image->resolution.y=90.0*image->rows/dimension_info.height;
- if (image->resolution.x == 0)
- image->resolution.x=image->resolution.y;
- else if (image->resolution.y == 0)
- image->resolution.y=image->resolution.x;
- else
- image->resolution.x=image->resolution.y=MagickMin(
- image->resolution.x,image->resolution.y);
- }
+ rsvg_handle_get_dimensions(svg_handle,&dimension_info);
+ image->columns=dimension_info.width;
+ image->rows=dimension_info.height;
}
- 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);