protected void handlePixelValue() {
		System.out.println("PIXEL VALUE");
		BufferedImage img = this.getBufferedImage();
		
		int displayPixel = 0;
		switch (displayedToolIndex) {
		case 1:
			displayPixel = img.getRGB((int)cover.getStartPoint().getX(), (int)cover.getStartPoint().getY());
			break;
		case 2:
			int red=0, green=0, blue=0, total=0;
			int beginX, endX, beginY, endY;
			if (cover.getStartPoint().getX() > cover.getEndPoint().getX()) {
				beginX = (int) cover.getEndPoint().getX();
				endX = (int) cover.getStartPoint().getX();
				beginY = (int) cover.getEndPoint().getY();
				endY = (int) cover.getStartPoint().getY();
			} else {
				endX = (int) cover.getEndPoint().getX();
				beginX = (int) cover.getStartPoint().getX();
				beginY = (int) cover.getStartPoint().getY();
				endY = (int) cover.getEndPoint().getY();
			}			
			
			double deltaY = (endY - beginY);
			double deltaX = (endX-beginX);
			double slope = deltaY/deltaX;
			System.out.println("SLOPE: " + slope);
			for (int x = beginX; x < endX; x++) {
				System.out.println(x + ", " + beginY);
				int pixel = img.getRGB(x, beginY);
				red += (pixel & 0xFF0000) >> 16;
				green += (pixel & 0x00FF00) >> 8;
				blue += (pixel & 0x0000FF);
				beginY += slope;
				total++;
			}
			displayPixel = (((red/total) << 16) | ((green/total) << 8) | (blue/total));
			break;
		case 3: 
			int[] arr = new int[(int)(Math.abs(cover.getEndPoint().getX()-cover.getStartPoint().getX()) * 
					(int)Math.abs(cover.getEndPoint().getY()-cover.getStartPoint().getY()))];
			
			arr = img.getRGB((int)cover.getStartPoint().getX(), (int)cover.getStartPoint().getY(), 
					(int)Math.abs(cover.getEndPoint().getX()-cover.getStartPoint().getX()), 
					(int)Math.abs(cover.getEndPoint().getY()-cover.getStartPoint().getY()), 
					arr, 0, (int)Math.abs(cover.getEndPoint().getX()-cover.getStartPoint().getX()));

			displayPixel = averageValues(arr);
			break;
		}
		this.setPixelValue(displayPixel);
	}