constructor(luminances, width /*int*/, height /*int*/, dataWidth /*int*/, dataHeight /*int*/, left /*int*/, top /*int*/) {
			super(width, height);
			this.dataWidth = dataWidth;
			this.dataHeight = dataHeight;
			this.left = left;
			this.top = top;
			if (luminances.BYTES_PER_ELEMENT === 4) { // Int32Array
				const size = width * height;
				const luminancesUint8Array = new Uint8ClampedArray(size);
				for (let offset = 0; offset < size; offset++) {
					const pixel = luminances[offset];
					const r = (pixel >> 16) & 0xff; // red
					const g2 = (pixel >> 7) & 0x1fe; // 2 * green
					const b = pixel & 0xff; // blue
					// Calculate green-favouring average cheaply
					luminancesUint8Array[offset] = /*(byte) */ ((r + g2 + b) / 4) & 0xFF;
				}
				this.luminances = luminancesUint8Array;
			}
			else {
				this.luminances = luminances;
			}
			if (undefined === dataWidth) {
				this.dataWidth = width;
			}
			if (undefined === dataHeight) {
				this.dataHeight = height;
			}
			if (undefined === left) {
				this.left = 0;
			}
			if (undefined === top) {
				this.top = 0;
			}
			if (this.left + width > this.dataWidth || this.top + height > this.dataHeight) {
				throw new IllegalArgumentException('Crop rectangle does not fit within image data.');
			}
		}
This class is used to help decode images from files which arrive as RGB data from
an ARGB pixel array. It does not support rotation.

@author dswitkin@google.com (Daniel Switkin)
@author Betaminos