title: Efficiently generating thumbnails with ImageMagick and convert
body: <p>I'm looking to efficiently generate various sized thumbnails with ImageMagick's convert utility in Python. Some of my image files are quite large (~15MB JPGs).</p>
  
  <p>One way I could do it would be to take the full-sized image, and to generate the various thumbnails from the full-sized image, as follows:</p>
  
  <pre><code>convert sample_image.jpg -resize 1024x768  sample_image-1024x768.jpg
  convert sample_image.jpg -resize 800x600   sample_image-800x600.jpg
  convert sample_image.jpg -resize 400x300   sample_image-400x300.jpg
  convert sample_image.jpg -resize 200x150   sample_image-200x150.jpg
  </code></pre>
  
  <p>But another way would be to resize the images from each other:</p>
  
  <pre><code>convert sample_image.jpg           -resize 1024x768  sample_image-1024x768.jpg
  convert sample_image-1024x768.jpg  -resize 800x600   sample_image-800x600.jpg
  convert sample_image-800x600.jpg   -resize 400x300   sample_image-400x300.jpg
  convert sample_image-400x300.jpg   -resize 200x150   sample_image-200x150.jpg
  </code></pre>
  
  <p>Is there any downside to doing this, or perhaps a better way? It seems like this would be a lot more efficient. </p>
  
  <p>As a corollary, are there any flags or "tricks" convert uses to speed up the process?</p>