private boolean checkBmp() throws IOException {
		byte[] a = new byte[28];
		if (read(a) != a.length) {
			return false;
		}
		width = getIntLittleEndian(a, 16);
		height = getIntLittleEndian(a, 20);
		bitsPerPixel = getShortLittleEndian(a, 26);
		if (width < 1 || height < 1) {
			return false;
		}
		if (bitsPerPixel != 1 && bitsPerPixel != 4 &&
		    bitsPerPixel != 8 && bitsPerPixel != 16 &&
		    bitsPerPixel != 24 && bitsPerPixel != 32) {
		    return false;
		}
		format = FORMAT_BMP;
		return true;
	}