getEnclosingRectangle() {
			const width = this.width;
			const height = this.height;
			const rowSize = this.rowSize;
			const bits = this.bits;
			let left = width;
			let top = height;
			let right = -1;
			let bottom = -1;
			for (let y = 0; y < height; y++) {
				for (let x32 = 0; x32 < rowSize; x32++) {
					const theBits = bits[y * rowSize + x32];
					if (theBits !== 0) {
						if (y < top) {
							top = y;
						}
						if (y > bottom) {
							bottom = y;
						}
						if (x32 * 32 < left) {
							let bit = 0;
							while (((theBits << (31 - bit)) & 0xFFFFFFFF) === 0) {
								bit++;
							}
							if ((x32 * 32 + bit) < left) {
								left = x32 * 32 + bit;
							}
						}
						if (x32 * 32 + 31 > right) {
							let bit = 31;
							while ((theBits >>> bit) === 0) {
								bit--;
							}
							if ((x32 * 32 + bit) > right) {
								right = x32 * 32 + bit;
							}
						}
					}
				}
			}
			if (right < left || bottom < top) {
				return null;
			}
			return Int32Array.from([left, top, right - left + 1, bottom - top + 1]);
		}
This is useful in detecting the enclosing rectangle of a 'pure' barcode.

@return {@code left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white