(void) ParseGeometry(geometry,&geometry_info);
area=geometry_info.rho+sqrt(MagickEpsilon);
distance=sqrt((double) former_width*former_height);
- scale.x=(double) former_width/(distance/sqrt(area));
- scale.y=(double) former_height/(distance/sqrt(area));
+ scale.x=(double) former_width*PerceptibleReciprocal(distance/sqrt(area));
+ scale.y=(double) former_height*PerceptibleReciprocal(distance/sqrt(area));
if ((scale.x < (double) *width) || (scale.y < (double) *height))
{
*width=(unsigned long) (former_width/(distance/sqrt(area)));