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

		Display.check();

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

		int srcPos = 0;
		int dstPos = 0;

		int bgcolor = ApplicationManager.manager.bgColor.getRGB();

		for (int y = 0; y < height; y++) {
			int mask = 128;
			for (int x = 0; x < width; x++) {
				pix[dstPos++] =
				 ((((bytes[srcPos] & mask) == 0) ? 0x0ffffffff : 0x0ff000000));

				mask = mask >> 1;
				if (mask == 0) {
					mask = 128;
					srcPos++;
				}
			}

			if (mask != 128)
				srcPos++;
		}

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