From 667c284a440d10ae3453ddc5915caa5333da892d Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Mon, 1 Mar 2021 20:51:17 +0800
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1718

---
 magick/resize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/magick/resize.c b/magick/resize.c
index 4564125..b8d9055 100644
--- a/magick/resize.c
+++ b/magick/resize.c
@@ -1084,10 +1084,10 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
     Adjust window function scaling to match windowing support for
     weighting function.  This avoids a division on every filter call.
   */
-  resize_filter->scale/=resize_filter->window_support;
+  resize_filter->scale*=PerceptibleReciprocal(resize_filter->window_support);
 
   /*
-   * Set Cubic Spline B,C values, calculate Cubic coefficients.
+    Set Cubic Spline B,C values, calculate Cubic coefficients.
   */
   B=0.0;
   C=0.0;
-- 
2.23.0

