public Mask multiplyBy(Mask mask) {
		if (this.getWidth() != mask.getHeight()) {
			throw new IllegalArgumentException("Incompatible matrix");
		}
		Mask result = new Mask(this.getHeight(), mask.getWidth());

		for (int i = -1 * this.getHeight() / 2; i <= this.getHeight() / 2; i++) {
			for (int j = -1 * mask.getWidth() / 2; j <= mask.getWidth() / 2; j++) {
				int ijValue = 0;
				for (int k = -1 * this.getWidth() / 2; k <= mask.getHeight() / 2; k++) {
					ijValue += this.getValue(i, k) * mask.getValue(k, j);
				}
				result.setPixel(i, j, ijValue);
			}
		}

		return result;
	}