private static PixImage buffer2PixImage(BufferedImage bImage) {
		PixImage pImage = new PixImage(bImage.getWidth(), bImage.getHeight());
		for (int x = 0; x < bImage.getWidth(); x++) {
			for (int y = 0; y < bImage.getHeight(); y++) {
				Color color = new Color(bImage.getRGB(x, y));
				pImage.setPixel(x, y, (short) color.getRed(),
						(short) color.getGreen(), (short) color.getBlue());
			}
		}
		return pImage;
	}