+2010-03-21 6.6.0-9 Cristy <quetzlzacatenango@image...>
+ * Respect the -density option when rendering a Postscript or PDF image.
+
2010-03-24 6.6.0-9 Glenn Randers-Pehrson <glennrp@image...>
* coders/png.c: Eliminated support of libpng versions older than 1.0.12.
* Relocated the new, misplaced png_get_rowbytes() call.
double
angle;
+ GeometryInfo
+ geometry_info;
+
Image
*image,
*next,
trimbox,
status;
+ MagickStatusType
+ flags;
+
PointInfo
delta;
delta.y=DefaultResolution;
if ((image->x_resolution == 0.0) || (image->y_resolution == 0.0))
{
- GeometryInfo
- geometry_info;
-
- MagickStatusType
- flags;
-
flags=ParseGeometry(PSDensityGeometry,&geometry_info);
image->x_resolution=geometry_info.rho;
image->y_resolution=geometry_info.sigma;
return((Image *) NULL);
}
*options='\0';
+ if (image_info->density != (char *) NULL)
+ {
+ flags=ParseGeometry(image_info->density,&geometry_info);
+ image->x_resolution=geometry_info.rho;
+ image->y_resolution=geometry_info.sigma;
+ if ((flags & SigmaValue) == 0)
+ image->y_resolution=image->x_resolution;
+ }
(void) FormatMagickString(density,MaxTextExtent,"%gx%g",
image->x_resolution,image->y_resolution);
if (image_info->page != (char *) NULL)
*options='\0';
if ((page.width == 0) || (page.height == 0))
(void) ParseAbsoluteGeometry(PSPageGeometry,&page);
- if (image_info->page != (char *) NULL)
- (void) ParseAbsoluteGeometry(image_info->page,&page);
+ if (image_info->density != (char *) NULL)
+ {
+ flags=ParseGeometry(image_info->density,&geometry_info);
+ image->x_resolution=geometry_info.rho;
+ image->y_resolution=geometry_info.sigma;
+ if ((flags & SigmaValue) == 0)
+ image->y_resolution=image->x_resolution;
+ }
(void) FormatMagickString(density,MaxTextExtent,"%gx%g",
image->x_resolution,image->y_resolution);
+ if (image_info->page != (char *) NULL)
+ (void) ParseAbsoluteGeometry(image_info->page,&page);
page.width=(unsigned long) floor(page.width*image->x_resolution/delta.x+0.5);
page.height=(unsigned long) floor(page.height*image->y_resolution/delta.y+
0.5);