title: Multiple resizes using a single image read/stream
body: <p>I'm writing a script that takes an image and creates multiple variants of different sizes (like imgur, basically). Right now, I do the following for each variant using <a href="https://github.com/aheckmann/gm" rel="nofollow">https://github.com/aheckmann/gm</a> in node.js:</p>
  
  <pre><code>function(file, size, newfile, callback) {
    gm(file)
      .noProfile()
      .quality(80)
      .resize(size, size)
      .write(newfile, callback)
  }
  </code></pre>
  
  <ol>
  <li>I assume that each time I resize the image, graphicsmagick reads the image form the disk and loads it into memory. Is this correct? If so, how can I make read from disk only once?</li>
  <li>Can I read the file from a stream, then run multiple resizes on a single stream? I don't know enough about streams, and when I tried doing this last, I got frustrated, gave up, and deleted that portion of the code.</li>
  </ol>