From d6bbdadeaef22c5a8dcf1be66679e91f177d658d Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Mon, 9 Aug 2021 17:12:25 +0200 Subject: [PATCH] Use Numerics.Clamp instead Math.Clamp (not available with net472) --- .../Formats/Tiff/PhotometricInterpretation/YCbCrConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/YCbCrConverter.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/YCbCrConverter.cs index aa64a6e32..c6594f908 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/YCbCrConverter.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/YCbCrConverter.cs @@ -68,7 +68,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation private static byte RoundAndClampTo8Bit(float value) { int input = (int)MathF.Round(value); - return (byte)Math.Clamp(input, 0, 255); + return (byte)Numerics.Clamp(input, 0, 255); } private readonly struct CodingRangeExpander