int numColors = iconHeader[2];
int numColors = iconHeader[2]; if (numColors == 0) numColors = 256;
byte[] loadInfoHeader(int[] iconHeader) {	int width = iconHeader[0];	int height = iconHeader[1];	int numColors = iconHeader[2];	if ((numColors != 2) && (numColors != 8) && (numColors != 16) &&		(numColors != 32) && (numColors != 256))		SWT.error(SWT.ERROR_INVALID_IMAGE);	if (inputStream.getPosition() < iconHeader[6]) {		// Seek to the specified offset		try {			inputStream.skip(iconHeader[6] - inputStream.getPosition());		} catch (IOException e) {			SWT.error(SWT.ERROR_IO, e);			return null;		}	}	byte[] infoHeader = new byte[WinBMPFileFormat.BMPHeaderFixedSize];	try {		inputStream.read(infoHeader);	} catch (IOException e) {		SWT.error(SWT.ERROR_IO, e);	}	if (((infoHeader[12] & 0xFF) | ((infoHeader[13] & 0xFF) << 8)) != 1)		SWT.error(SWT.ERROR_INVALID_IMAGE);	int infoWidth = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);	int infoHeight = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);	if (height == infoHeight && bitCount == 1) height /= 2;	if (!((width == infoWidth) && (height * 2 == infoHeight) &&		((bitCount == 1) || (bitCount == 4) || (bitCount == 8))))			SWT.error(SWT.ERROR_INVALID_IMAGE);	infoHeader[8] = (byte)(height & 0xFF);	infoHeader[9] = (byte)((height >> 8) & 0xFF);	infoHeader[10] = (byte)((height >> 16) & 0xFF);	infoHeader[11] = (byte)((height >> 24) & 0xFF);	return infoHeader;}