Exemplo n.º 1
0
        /// <summary>
        /// Returns a new object with cropped image data. Implementations may keep a reference to the
        /// original data rather than a copy. Only callable if isCropSupported() is true.
        /// </summary>
        /// <param name="left">The left coordinate, which must be in [0, Width)</param>
        /// <param name="top">The top coordinate, which must be in [0, Height)</param>
        /// <param name="width">The width of the rectangle to crop.</param>
        /// <param name="height">The height of the rectangle to crop.</param>
        /// <returns> A cropped version of this object.</returns>
        public BinaryBitmap crop(int left, int top, int width, int height)
        {
            var newSource = binarizer.LuminanceSource.crop(left, top, width, height);

            return(new BinaryBitmap(binarizer.createBinarizer(newSource)));
        }