/// <summary>
        /// Creates a cropped view of the source context.
        /// </summary>
        public static IReadOnlyPixelBuffer Crop(
            this IReadOnlyPixelBufferContext context, Rectangle sourceRectangle)
        {
            if (context.CheckBounds(sourceRectangle))
            {
                return(context);
            }

            return(new ReadOnlyCropBuffer(context.Pixels, sourceRectangle));
        }
        /// <summary>
        /// Creates a cropped view of the source context.
        /// </summary>
        public static IReadOnlyPixelBuffer <TPixel> Crop <TPixel>(
            this IReadOnlyPixelBufferContext <TPixel> context, Rectangle sourceRectangle)
            where TPixel : unmanaged, IPixel
        {
            if (context.CheckBounds(sourceRectangle))
            {
                return(context);
            }

            return(new ReadOnlyCropBuffer <TPixel>(context.Pixels, sourceRectangle));
        }