title: Randomly rotate image in Imagemagick
body: <p>I'm new to Imagemagick. I need to rotate this pattern</p>
  
  <p><a href="https://i.stack.imgur.com/femjj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/femjj.png" alt="original image"></a> </p>
  
  <p>for some random angle in degrees.  What I can do at my best is:</p>
  
  <pre><code>convert -rotate -15 -background none originfile.png savefile.png
  </code></pre>
  
  <p>which produces this:</p>
  
  <p><a href="https://i.stack.imgur.com/AF9Vk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AF9Vk.png" alt="rotated image"></a></p>
  
  <p>I have a problem:</p>
  
  <p>I need to have a random rotation angle in the range from -30 to 30. But right now, I can only choose the rotation angle manually.</p>