Browse Source

Use Numerics.Clamp instead Math.Clamp (not available with net472)

pull/1731/head
Brian Popow 5 years ago
parent
commit
d6bbdadeae
  1. 2
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/YCbCrConverter.cs

2
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

Loading…
Cancel
Save