protected void switchChannel(String toReplace, String replacing) {
		if (toReplace.equals(replacing.toLowerCase())) { //Nothing to edit, reload the initial picture
			
			this.changePicture(this.getRelURL());
			this.revalidateContainer();
			reloadChanges();
			return;
		}
		
//		BufferedImage toEdit = getBufferedImage();
//		FilteredImageSource filteredSrc;
//		

//			ColorFilter filter = new ColorFilter();
//			
//			if (toReplace.toLowerCase().equals(labels[0].toLowerCase())) {
//				filter.setDisplayed(0xFF0000);
//				setOthers(filter, replacing, labels[1].toLowerCase(), 0x00FF00, 0x0000FF, 8, 16, LEFT_SHIFT);
//			} else if (toReplace.toLowerCase().equals(labels[1].toLowerCase())) {
//				filter.setDisplayed(0x00FF00);
//				setOthers(filter, replacing, labels[0].toLowerCase(), 0xFF0000, 0x0000FF, 8, 8, MIDDLE);
//			} else {
//				filter.setDisplayed(0x0000FF);
//				setOthers(filter, replacing, labels[0].toLowerCase(), 0xFF0000, 0x00FF00, 16, 8, RIGHT_SHIFT);
//			}
		BufferedImage toEdit = null;
		try {
			toEdit = getOriginalBufferedImage();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		FilteredImageSource filteredSrc = null;
		ColorSwapper filter = null;
//		if (replacing.toLowerCase().equals(labels[3].toLowerCase())) {
//			//filter = hideColor(toReplace);
//			//filteredSrc = new FilteredImageSource(toEdit.getSource(), filter);
//			
//		} else {
			filter = new ColorSwapper();
			int[] redShift = {-1, -1, -1}, greenShift = {-1, -1, -1}, blueShift = {-1, -1, -1};
			int redShiftIndex = 0, greenShiftIndex = 0, blueShiftIndex = 0;
			boolean[] greenLeftShift = new boolean[3];
			boolean[] hideRed = {false, false, false}, hideGreen = {false, false, false}, hideBlue = {false, false, false};
			for (int i =0; i < 3; i++ ) {
				if (((String)selectors[i].getSelectedItem()).toLowerCase().equals("red")) {
					
					redShift[redShiftIndex] = getShift("red", labels[i]);
					
					System.out.println("Adding to red shifts: " + redShift[redShiftIndex]);
					redShiftIndex++;
				} else if (((String)selectors[i].getSelectedItem()).toLowerCase().equals("green")) {
					greenShift[greenShiftIndex] = getShift("green", labels[i]);
					if (greenShift[greenShiftIndex] == -8) {
						greenLeftShift[greenShiftIndex] = true;
						greenShift[greenShiftIndex] = 8;
					}
					
					System.out.println("Adding to green shifts: " + greenShift[greenShiftIndex] + " " + greenLeftShift[greenShiftIndex]);
					greenShiftIndex++;

				} else if (((String)selectors[i].getSelectedItem()).toLowerCase().equals("blue")) {
					blueShift[blueShiftIndex] = getShift("blue", labels[i]);
					System.out.println("Adding to blue shifts: " + blueShift[blueShiftIndex]);
					blueShiftIndex++;
				} else {
					System.out.println("HIDING A COLOR");
					if (labels[i].equals("Red")) {
						hideRed[redShiftIndex] = true;
						redShiftIndex++;
					} else if (labels[i].equals("Green")) {
						hideGreen[greenShiftIndex]=true;
						greenShiftIndex++;
					} else {
						hideBlue[blueShiftIndex]=true;
						blueShiftIndex++;
					}
				}
			}
			filter.setBlueColorShift(blueShift);
			filter.setGreenColorShift(greenShift);
			filter.setRedColorShift(redShift);
			filter.setGreenLeftShift(greenLeftShift);
			filter.setHideRed(hideRed);
			filter.setHideGreen(hideGreen);
			filter.setHideBlue(hideBlue);

		filteredSrc = new FilteredImageSource(toEdit.getSource(), filter);
		
		
		Image img = Toolkit.getDefaultToolkit().createImage(filteredSrc);

		this.changePicture(img);
		
//		redShift = getShift("red", );
//		if (redShift == -1) {
//			filter.setHideRed(true);
//		} else {
//			filter.setRedColorShift(redShift);
//		}
//	greenShift = getShift("green", (String)selectors[1].getSelectedItem());
//	if (greenShift == -1) {
//		filter.setHideGreen(true);
//	} else {
//		if (greenShift < 0) {
//			filter.setGreenLeftShift(true);
//			filter.setGreenColorShift(-greenShift);
//		} else {
//			filter.setGreenColorShift(greenShift);
//		}
//	}
//	
//	blueShift = getShift("blue", (String)selectors[2].getSelectedItem());
//	if (blueShift == -1) {
//		filter.setHideBlue(true);
//	} else {
//		filter.setBlueColorShift(blueShift);
//	}
//	if (replacing.toLowerCase().equals(labels[0].toLowerCase())) {
//		System.out.println("REDFILTER");
//		filter = new RedFilter();
//		if (toReplace.equals(labels[1].toLowerCase())) {
//			
//			((RedFilter)filter).setDisplayAs(0x00FF00);
//		} else {
//			((RedFilter)filter).setDisplayAs(0x0000FF);
//		}
//	} else if (replacing.toLowerCase().equals(labels[1].toLowerCase())) {
//		filter = new GreenFilter();
//		if (toReplace.equals(labels[0].toLowerCase())) {
//			
//			((GreenFilter)filter).setDisplayAs(0xFF0000);
//		} else {
//			((GreenFilter)filter).setDisplayAs(0x0000FF);
//		}
//	} else {
//		filter = new BlueFilter();
//		if (toReplace.equals(labels[0].toLowerCase())) {
//			
//			((BlueFilter)filter).setDisplayAs(0xFF0000);
//		} else {
//			((BlueFilter)filter).setDisplayAs(0x00FF00);
//		}
//	}
	}