title: OpenCV Python : rotate image without cropping sides
body: <p>Imagine I have these images :</p>
  
  <p><a href="https://i.stack.imgur.com/jjRfe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jjRfe.png" alt="ttps://i.stack.imgur.com/jjRfe.png"></a></p>
  
  <p>I want the image from left to be rotated like the image of the middle, not the right one. How do I do this using Python and OpenCV. I looked at <code>getRotationMatrix2D</code> and <code>warpAffine</code> but the examples about it transform my image to the right one.</p>