public static int[] nearNeighbour(int[] pixs, int iw, int ih, int ow, int oh, float p) {

		int[] opix = new int[ow * oh];
		for (int i = 0; i < oh; i++) {
			int u = (int) (i / p);
			for (int j = 0; j < ow; j++) {
				int v = (int) (j / p);
				int a = pixs[u * iw + v];
				opix[i * ow + j] = a;
			}
		}
		return opix;
	}