title: Crop thumbnail in imagemagick - specify center at X, Y position
body: <p>I would like to generate thumbnails for my website. Now I am using the following to process folder (based on <a href="https://stackoverflow.com/questions/7261855/recommendation-for-compressing-jpg-files-with-imagemagick">this</a> answer):</p>
  
  <pre><code>mogrify -interlace Plane -thumbnail 280x210^ 
  -gravity center -extent 280x210 -quality 85% *.jpg
  </code></pre>
  
  <p>This will create thumbnails with given size (resize and crop).</p>
  
  <p>I also have single image version of this command:</p>
  
  <pre><code>convert test.jpg -interlace Plane -thumbnail 280x210^ 
   -gravity center -extent 280x210 -quality 85%  testout.jpg 
  </code></pre>
  
  <p>I'm also using <a href="http://www.thregr.org/~wavexx/hacks/facedetect/" rel="nofollow noreferrer">facedetect</a> to get positions of faces from the original image (before creating thumbnails). For photos with faces I have calculated average X, Y position of faces center.</p>
  
  <p>Now, I would like to use this position in the command above to crop pictures smarter. Currently image is cropped from both sides (<code>-gravity center</code>), but I would like to use my coordinates so faces are displayed when image is cropped.</p>
  
  <p>Is there a way how I can feed this into imagemagick?</p>