}
if (((flags & SeparatorValue) != 0) && ((flags & WidthValue) == 0) &&
(height != (size_t *) NULL) && (width != (size_t *) NULL))
- *width=(*height);
+ *width=(*height);
}
#if 0
/* Debugging Geometry */
scale.y=geometry_info.sigma;
if ((status & SigmaValue) == 0)
scale.y=scale.x;
- region_info->width=(size_t) floor((scale.x*image->columns/100.0)+0.5);
- region_info->height=(size_t) floor((scale.y*image->rows/100.0)+0.5);
+ region_info->width=(size_t) MagickMax(floor((scale.x*image->columns/
+ 100.0)+0.5),1.0);
+ region_info->height=(size_t) MagickMax(floor((scale.y*image->rows/
+ 100.0)+0.5),1.0);
}
/*
Adjust offset according to gravity setting.
scale.y=geometry_info.sigma;
if ((percent_flags & SigmaValue) == 0)
scale.y=scale.x;
- *width=(size_t) floor(scale.x*former_width/100.0+0.5);
- *height=(size_t) floor(scale.y*former_height/100.0+0.5);
+ *width=(size_t) MagickMax(floor(scale.x*former_width/100.0+0.5),1.0);
+ *height=(size_t) MagickMax(floor(scale.y*former_height/100.0+0.5),1.0);
former_width=(*width);
former_height=(*height);
}