ImageData colorMaskImage(int pixel) {
		ImageData mask = new ImageData(width, height, 1, bwPalette(), 2, null,
				0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
		int[] row = new int[width];
		for (int y = 0; y < height; y++) {
			getPixels(0, y, width, row, 0);
			for (int i = 0; i < width; i++) {
				if (pixel != -1 && row[i] == pixel) {
					row[i] = 0;
				} else {
					row[i] = 1;
				}
			}
			mask.setPixels(0, y, width, row, 0);
		}
		return mask;
	}