From f3190d4a6e6e8556575c84b5d976f77d111caa74 Mon Sep 17 00:00:00 2001
From: Cristy <mikayla-grace@urban-warrior.org>
Date: Wed, 3 Feb 2021 15:50:29 -0500
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/3195

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

diff --git a/magick/resample.c b/magick/resample.c
index 7b844e1..7728920 100644
--- a/magick/resample.c
+++ b/magick/resample.c
@@ -1212,10 +1212,10 @@ MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
   { register double scale;
 #if FILTER_LUT
     /* scale so that F = WLUT_WIDTH; -- hardcoded */
-    scale = (double)WLUT_WIDTH/F;
+    scale=(double) WLUT_WIDTH*PerceptibleReciprocal(F);
 #else
     /* scale so that F = resample_filter->F (support^2) */
-    scale = resample_filter->F/F;
+    scale=resample_filter->F*PerceptibleReciprocal(F);
 #endif
     resample_filter->A = A*scale;
     resample_filter->B = B*scale;
-- 
2.23.0

