static thresholdBlock(luminances, xoffset /*int*/, yoffset /*int*/, threshold /*int*/, stride /*int*/, matrix) {
			for (let y = 0, offset = yoffset * stride + xoffset; y < HybridBinarizer.BLOCK_SIZE; y++, offset += stride) {
				for (let x = 0; x < HybridBinarizer.BLOCK_SIZE; x++) {
					// Comparison needs to be <= so that black == 0 pixels are black even if the threshold is 0.
					if ((luminances[offset + x] & 0xFF) <= threshold) {
						matrix.set(xoffset + x, yoffset + y);
					}
				}
			}
		}
Applies a single threshold to a block of pixels.