title: ImageMagick chaining woes
body: <p>I can't figure out how to properly chain commands in ImageMagick</p>
  
  <p>Things that do what I expect in isolation :</p>
  
  <p>Resize and then crop </p>
  
  <pre><code>$ convert input.jpg -resize '400x400&gt;' -gravity center -crop 300x400+0+0 +repage output.jpg
  </code></pre>
  
  <p>Apply overlay </p>
  
  <pre><code>$ convert -composite input.jpg overlay.png output.jpg
  </code></pre>
  
  <p>Annotate </p>
  
  <pre><code>$ convert input.jpg -annotate +55+357 'The text I want' output.jpg
  </code></pre>
  
  <p>I've had limited success in combining these together for instance :</p>
  
  <pre><code>$ convert \( input.jpg -resize '400x400&gt;' -gravity center -crop 300x400+0+0 +repage \) mask.png -composite output.jpg
  </code></pre>
  
  <p>Resizes the image and crops it, then applies my overlay. However regardless of what I try I can't then get the annotation to appear.</p>
  
  <p>What I want to do is something like :</p>
  
  <pre><code>$ convert \( input.jpg -resize '400x400&gt;' -gravity center -crop 300x400+0+0 +repage \) mask.png -composite \( -annotate +55+357 'The text I want' \) output.jpg
  </code></pre>
  
  <p>Thanks.</p>