diff --git a/src/ImageSharp/Image/PixelAccessor.cs b/src/ImageSharp/Image/PixelAccessor.cs index 39534dbdec..f11082df71 100644 --- a/src/ImageSharp/Image/PixelAccessor.cs +++ b/src/ImageSharp/Image/PixelAccessor.cs @@ -420,6 +420,14 @@ namespace ImageSharp return this.pixelsBase + ((targetY * this.Width) * Unsafe.SizeOf()); } + /// + /// Checks the coordinates to ensure they are within bounds. + /// + /// The x-coordinate of the pixel. Must be greater than zero and smaller than the width of the pixel. + /// The y-coordinate of the pixel. Must be greater than zero and smaller than the width of the pixel. + /// + /// Thrown if the coordinates are not within the bounds of the image. + /// [Conditional("DEBUG")] private void CheckCoordinates(int x, int y) {