title: Using a rectangle to create a search region on an image
body: <p>I have an Image viewer that displays an image. I want to draw a rectangle using the mouse over the image and get the x and y coordinates of the rectangle (X1, X2, Y1, and Y2). I will use these coordinates to create a search region and find the max and min values in an array that have the exact number of pixels as the image in both axes.<br>
  Can anyone guide me to a direction to start please?</p>