Replacing a color in image

To select a color in an image and replace it with a new color, follow the steps given below. 1. In main.xml, add two Buttons button_pick and button_replace , add an ImageView imageview1 , add two LinearLayout linear_getcolor and linear_setcolor , add an EditText edittext1 , and add a ProgressBar progressbar1 . 2. Create a FilePicker imagepicker : image/* for picking image. 3. Create a String variable path and five number variables width , height , w , h , and n . 4. In onCreate , use blocks to make ProgressBar Gone, and setOnTouchListener for imageview1 . The code used is imageview1.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int eid = event.getAction(); switch (eid) { case MotionEvent.ACTION_MOVE: int x = (int)event.getX(); int y = (int)event.getY(); if (bitmap != null){ if (x<width && x>0 && y<height && y>0){ colorint = bitmap.getPixel(x, y); linear_getc...