@Override public LuminanceSource crop(int left, int top, int width, int height) { return new InvertedLuminanceSource(delegate.crop(left, top, width, height)); }
@Override public LuminanceSource crop(int left, int top, int width, int height) { return new InvertedLuminanceSource(delegate.crop(left, top, width, height)); }
/** * 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. * * @param left The left coordinate, which must be in [0,getWidth()) * @param top The top coordinate, which must be in [0,getHeight()) * @param width The width of the rectangle to crop. * @param height The height of the rectangle to crop. * @return A cropped version of this object. */ public BinaryBitmap crop(int left, int top, int width, int height) { LuminanceSource newSource = binarizer.getLuminanceSource().crop(left, top, width, height); return new BinaryBitmap(binarizer.createBinarizer(newSource)); }
/** * 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. * * @param left The left coordinate, which must be in [0,getWidth()) * @param top The top coordinate, which must be in [0,getHeight()) * @param width The width of the rectangle to crop. * @param height The height of the rectangle to crop. * @return A cropped version of this object. */ public BinaryBitmap crop(int left, int top, int width, int height) { LuminanceSource newSource = binarizer.getLuminanceSource().crop(left, top, width, height); return new BinaryBitmap(binarizer.createBinarizer(newSource)); }
/** * 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. * * @param left The left coordinate, 0 <= left < getWidth(). * @param top The top coordinate, 0 <= top <= getHeight(). * @param width The width of the rectangle to crop. * @param height The height of the rectangle to crop. * @return A cropped version of this object. */ public BinaryBitmap crop(int left, int top, int width, int height) { LuminanceSource newSource = binarizer.getLuminanceSource().crop(left, top, width, height); return new BinaryBitmap(binarizer.createBinarizer(newSource)); }