public int getPixelComponent(int pixel, char color) {
		int alpha = pixel >> 24 & 0xFF;
		switch (color) {
		  case 'R': pixel >>= 16; break;
		  case 'G': pixel >>= 8; break;
		  case 'B': break;
		  default: throw new ErrorException("getPixelComponent: Illegal color");
		}
		pixel &= 0xFF;
		return (alpha * pixel + (0xFF - alpha) * 0xFF) / 0xFF;
	}