From c7038e710ad0204d6cb37a0229fc55f6f8a8662f Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Thu, 3 Oct 2019 17:39:55 -0400
Subject: [PATCH] ://github.com/ImageMagick/ImageMagick/issues/1711

---
 magick/colorspace-private.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/magick/colorspace-private.h b/magick/colorspace-private.h
index 652e44547..090723756 100644
--- a/magick/colorspace-private.h
+++ b/magick/colorspace-private.h
@@ -75,9 +75,9 @@ static inline void ConvertRGBToCMYK(MagickPixelPacket *pixel)
     black=magenta;
   if (yellow < black)
     black=yellow;
-  cyan=(MagickRealType) ((cyan-black)/(1.0-black));
-  magenta=(MagickRealType) ((magenta-black)/(1.0-black));
-  yellow=(MagickRealType) ((yellow-black)/(1.0-black));
+  cyan=(MagickRealType) (PerceptibleReciprocal(1.0-black)*(cyan-black));
+  magenta=(MagickRealType) (PerceptibleReciprocal(1.0-black)*(magenta-black));
+  yellow=(MagickRealType) (PerceptibleReciprocal(1.0-black)*(yellow-black));
   pixel->colorspace=CMYKColorspace;
   pixel->red=QuantumRange*cyan;
   pixel->green=QuantumRange*magenta;
