public static Image createTransparentImageFromBitmap(
		byte[] bytes,
		int width,
		int height) {

		Display.check();

		int pix[] = new int[width * height];
		int index = 0;

		int srcPos = 0;
		int dstPos = 0;

		int[] colors =
			{
				0x000ffffff,
				0x0ffffffff,
				0x0ff000000,
				0x0ff000000 };

		for (int y = 0; y < height; y++) {
			int shift = 6;
			for (int x = 0; x < width; x++) {
				pix[dstPos++] = colors[(bytes[srcPos] >> shift) & 3];

				shift -= 2;
				if (shift < 0) {
					shift = 6;
					srcPos++;
				}
			}
			if (shift != 6)
				srcPos++;
		}

		Image ret =
			new Image(
				java.awt.Toolkit.getDefaultToolkit().createImage(
					new MemoryImageSource(width, height, pix, 0, width)),
				false, true, "createTransparentImageFromBitmap");
		ret._transparent = true;
		return ret;
	}