encode(contents, format, width /*int*/, height /*int*/, hints) {
			if (contents.length === 0) {
				throw new IllegalArgumentException('Found empty contents');
			}
			if (format !== BarcodeFormat$1.QR_CODE) {
				throw new IllegalArgumentException('Can only encode QR_CODE, but got ' + format);
			}
			if (width < 0 || height < 0) {
				throw new IllegalArgumentException(`Requested dimensions are too small: ${width}x${height}`);
			}
			let errorCorrectionLevel = ErrorCorrectionLevel.L;
			let quietZone = QRCodeWriter.QUIET_ZONE_SIZE;
			if (hints !== null) {
				if (undefined !== hints.get(EncodeHintType$1.ERROR_CORRECTION)) {
					errorCorrectionLevel = ErrorCorrectionLevel.fromString(hints.get(EncodeHintType$1.ERROR_CORRECTION).toString());
				}
				if (undefined !== hints.get(EncodeHintType$1.MARGIN)) {
					quietZone = Number.parseInt(hints.get(EncodeHintType$1.MARGIN).toString(), 10);
				}
			}
			const code = Encoder.encode(contents, errorCorrectionLevel, hints);
			return QRCodeWriter.renderResult(code, width, height, quietZone);
		}
This object renders a QR Code as a BitMatrix 2D array of greyscale values.

@author dswitkin@google.com (Daniel Switkin)