Browse Source

Update src/ImageSharp/Formats/DecoderOptions.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/2180/head
James Jackson-South 4 years ago
committed by GitHub
parent
commit
8826e87718
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Formats/DecoderOptions.cs

2
src/ImageSharp/Formats/DecoderOptions.cs

@ -37,6 +37,6 @@ namespace SixLabors.ImageSharp.Formats
/// <summary>
/// Gets or sets the maximum number of image frames to decode, inclusive.
/// </summary>
public uint MaxFrames { get => this.maxFrames; set => this.maxFrames = Math.Min(Math.Max(value, 1), int.MaxValue); }
public uint MaxFrames { get => this.maxFrames; set => this.maxFrames = Math.Clamp(value, 1, int.MaxValue); }
}
}

Loading…
Cancel
Save