title: How to replace color of an image?
body: <p>I want to replace color of an image. For example turn all blue colors to red without any distortion on shape. When i try this i can swap the colors by iterating every pixel, however the shape of the swapped area turns into a flat shape.</p>
  
  <p>example1 input  : <a href="http://www.tutorialwiz.com/tutorials/changing_color/images/original.jpg" rel="nofollow">http://www.tutorialwiz.com/tutorials/changing_color/images/original.jpg</a><br>
  example1 output: <a href="http://www.tutorialwiz.com/tutorials/changing_color/images/3.jpg" rel="nofollow">http://www.tutorialwiz.com/tutorials/changing_color/images/3.jpg</a></p>
  
  <p>example2: input output together : <a href="http://www.digital-photography-school.com/wp-content/uploads/2009/07/before-after.jpg" rel="nofollow">http://www.digital-photography-school.com/wp-content/uploads/2009/07/before-after.jpg</a></p>