public static void compressComponent(int[][] component, int componentCode) throws IOException{
		String fileName;
		if(componentCode == 0)
			fileName = "redCompressed";
		else if(componentCode == 1)
			fileName = "greenCompressed";
		else if(componentCode == 2)
			fileName = "blueCompressed";
		else
			fileName = "alphaCompressed";

		System.out.println("Saving file " + System.getProperty("user.dir") + "/data/" + fileName + ".csv");  
		FileWriter fr = new FileWriter(System.getProperty("user.dir") + "/data/" + fileName + ".csv");  
        BufferedWriter br = new BufferedWriter(fr);  
        PrintWriter out = new PrintWriter(br);

        int i1,j1;
		int [][] temp = new int[8][8];
		int vBlocks = component.length/8;
		int hBlocks = component[1].length/8;
		for(int i = 0; i < vBlocks; i++){
			for(int j = 0; j < hBlocks;j++){
				i1 = i * 8;
				j1 = j * 8;
				//System.out.println(i1 + " " + j1);
				temp = DCT.quantize(DCT.DCT2(component,i1,j1));

				for(int row = 0; row < 8;row++){
					for(int col = 0; col < 8; col++){
						//System.out.print("[" + i + "," + j + "]" + temp[row][col]+" ");
						if(temp[row][col]!=0)
							out.write(temp[row][col] +",");
					}
					out.write("\n");
				}
				out.write("---\n");
			}
		}        

        out.close();
	}