private void countPixels() {
		System.out.println("counting");
		col_count = new int[256]; //zero out count array
		if (Color.RED.equals(col)) {
			for (int row = 0; row<img.getHeight(); row++) {
				for (int col = 0; col<img.getWidth(); col++) {
					col_count[(img.getRGB(col, row) >> 16) & 0xFF]++;
				}
			}
		}
		else if (Color.BLUE.equals(col)) {
			for (int row = 0; row<400; row++) {
				for (int col = 0; col<400; col++) {
					col_count[(img.getRGB(col, row) >> 8) & 0xFF]++;
				}
			}
		}
		else {
			for (int row = 0; row<400; row++) {
				for (int col = 0; col<400; col++) {
					col_count[(img.getRGB(col, row)) & 0xFF]++;
				}
			}
		}
	}