From 6e76c420b30b7ce8c11f45c91f0f2ce87a423dd4 Mon Sep 17 00:00:00 2001 From: Florian Levis Date: Thu, 15 Feb 2024 22:54:25 +0100 Subject: [PATCH] Use Quantum.Convert for K value in MagickColor (#1512) --- src/Magick.NET/Colors/MagickColor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magick.NET/Colors/MagickColor.cs b/src/Magick.NET/Colors/MagickColor.cs index 3379d69c64..a246a2b727 100644 --- a/src/Magick.NET/Colors/MagickColor.cs +++ b/src/Magick.NET/Colors/MagickColor.cs @@ -257,7 +257,7 @@ private MagickColor(NativeMagickColor instance) if (!color.IsCmyk) return new MagickColor(red, green, blue, color.A); - var key = (QuantumType)percentage.Multiply((double)color.K); + var key = Quantum.Convert(percentage.Multiply((double)color.K)); return new MagickColor(red, green, blue, key, color.A); }