private void createErrorImage()
	{
		Image eImg = new Image(rfr.getW(), rfr.getH());

		for(int i = 0; i < errorBlocks.size();i++)//find min and max
		{
			RGB[][] e = errorBlocks.get(i);
			for(int y = 0; y < 16; y++)
			{
				for(int x = 0; x < 16; x++)
				{
					double err = getGrayPixel(e[x][y].getRGB());
					if(err > max)
						max = (int)err;
					if(err < min)
						min = (int)err;
				}
			}
		}
		
		for(int i = 0; i < errorBlocks.size();i++)
		{	
			RGB[][] error = errorBlocks.get(i);
			int xpos = (i % h) * 16;
			int ypos = (i / h) * 16;
			for(int y = 0; y < 16; y++)
			{
				for(int x = 0; x < 16; x++)
				{
					int[] rgb = new int[3];
					int scaled = (int)(getGrayPixel(error[x][y].getRGB()) - min)*255/(max-min);
					rgb[0] = rgb[1] = rgb[2] = scaled;
					eImg.setPixel(xpos + x, ypos + y, rgb);
				}
			}
		}
		
		eImg.display("Error Image");
	}