title: Rotating an image in C/C++
body: <p>I need code for rotating an image in C++ which functions like imrotate function of matlab.
  Please suggest a good link. Or if someone can provide the code for imrotate.</p>
  
  <p>Or at least please explain the algorithm.</p>
  
  <p>Its not a homework. I need this code for my project. And we can use any external library or code.</p>