exception);
(void) QueryColorCompliance(TransparentColor,AllCompliance,
&image->transparent_color,exception);
- image->resolution.x=DefaultResolution;
- image->resolution.y=DefaultResolution;
- image->units=PixelsPerInchResolution;
GetTimerInfo(&image->timer);
image->cache=AcquirePixelCache(0);
image->channel_mask=DefaultChannels;
#endif
} SVGInfo;
\f
+/*
+ Static declarations.
+*/
+static char
+ SVGDensityGeometry[] = "90.0x90.0";
+\f
/*
Forward declarations.
*/
image=DestroyImageList(image);
return((Image *) NULL);
}
+ if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
+ {
+ GeometryInfo
+ geometry_info;
+
+ int
+ flags;
+
+ flags=ParseGeometry(SVGDensityGeometry,&geometry_info);
+ image->resolution.x=geometry_info.rho;
+ image->resolution.y=geometry_info.sigma;
+ if ((flags & SigmaValue) == 0)
+ image->resolution.y=image->resolution.x;
+ }
if (LocaleCompare(image_info->magick,"MSVG") != 0)
{
const DelegateInfo
if (svg_handle == (RsvgHandle *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
rsvg_handle_set_base_uri(svg_handle,image_info->filename);
- if ((image->resolution.x != 72.0) && (image->resolution.y != 72.0))
- rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x,
- image->resolution.y);
+ rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x,
+ image->resolution.y);
while ((n=ReadBlob(image,MaxTextExtent,message)) != 0)
{
error=(GError *) NULL;
/* User specified resolution */
resolution_y=DefaultResolution;
- if (image->resolution.y > 0)
+ if (image->resolution.y != 0.0)
{
resolution_y = image->resolution.y;
if (image->units == PixelsPerCentimeterResolution)
resolution_y *= CENTIMETERS_PER_INCH;
}
resolution_x=DefaultResolution;
- if (image->resolution.x > 0)
+ if (image->resolution.x != 0.0)
{
resolution_x = image->resolution.x;
if (image->units == PixelsPerCentimeterResolution)