title: How do I create a new image by drawing on top of an existing one using Quartz?
body: <p>i have a view with uiimageview i assign this uiimageview image by camera..now i want to do some drawing onto image....using coregraphics.i want to do something like this... select an area by touching and drawing line when line joins something like circle or any shape..i want to change that particular area in to something else for example change color there.turn that into grayscale.. till now i am able to draw line...here is an image of line drawn over a uiimage view...</p>
  
  <p><a href="https://i.stack.imgur.com/3A4I7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3A4I7.png" alt="alt text"></a>
  </p>
  
  <p>but i am unable to figure it out how do i draw at imageview's image..mean how to modify imageview's image???</p>
  
  <p>also i want to restore image when click on clear button or something like undo..does someone knows how to achieve this?</p>
  
  <p>and</p>
  
  <p>how do i create a rectangle when click on crop button move the rectangle any where on the screen...and then push the button to crop the image...and then save cropped image..</p>