public static int[] mirror(int[] pixs, int w, int h, int n) {
		int[] pix = new int[w * h];

		for (int j = 0; j < h; j++) {
			for (int i = 0; i < w; i++) {
				if (n == 0) {
					int u = w - 1 - i;
					int v = j;
					pix[v * w + u] = pixs[j * w + i];
				} else if (n == 1) {
					int u = i;
					int v = h - 1 - j;
					pix[v * w + u] = pixs[j * w + i];
				}
			}
		}
		return pix;
	}