ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
image.toString(),
null,
null);
}
Gray8Image imageInput = (Gray8Image) image;
if (this.cX + this.cWidth > image.getWidth() ||
this.cY + this.cHeight > image.getHeight()) {
throw new Error(
Error.PACKAGE.CORE,
jjil.core.ErrorCodes.BOUNDS_OUTSIDE_IMAGE,
image.toString(),
this.toString(),
null);
}
Gray8Image imageResult = new Gray8Image(this.cWidth,this.cHeight);
byte[] src = imageInput.getData();
byte[] dst = imageResult.getData();
for (int i=0; i<this.cHeight; i++) {
System.arraycopy(
src,
(i+this.cY)*image.getWidth() + this.cX,
dst,