diff --git a/magick/draw.c b/magick/draw.c index 71e93c80bf..08ed18c871 100644 --- a/magick/draw.c +++ b/magick/draw.c @@ -2160,7 +2160,7 @@ MagickExport MagickBooleanType DrawGradientImage(Image *image, repeat=fmod(offset,(double) gradient->radius); antialias=repeat+1.0 > gradient->radius ? MagickTrue : MagickFalse; - offset=repeat/gradient->radius; + offset=repeat*PerceptibleReciprocal(gradient->radius); } } for (i=0; i < (ssize_t) gradient->number_stops; i++)