title: Convert sprite sheet to gif animation
body: <p>The frames go in the order left to right, top to bottom, the animations go sequentially, all frames are of the same size.</p>
  
  <pre><code>1234
  5612
  345
  </code></pre>
  
  <p>I need a command that would take frame size, coordinates of the first frame and frame count as input and give an animated gif as output. Preferably without generating intermediate files.</p>
  
  <p>I could do this using a programming language, but isn't there a way to do it easier with a command line tool like ImageMagick or GraphicsMagick? It feels to me like it should be a common task, yet I've found only questions about how to convert gif to sprite sheet, not the other way around.</p>