title: How to do mass convert/resize images with different orientaton with use ImageMagick?
body: <p>I have some folder containing vertical and horizontal images and I want resize image into smaller format and lower quality.</p>
  
  <p>Some of them has format:</p>
  
  <ol>
  <li>width = 3x, height = 2x - i.e. 3000x2000 or 1500x1000.</li>
  <li>width = 2x, height = 3x - i.e. 2000x3000 or 1000x1500.</li>
  </ol>
  
  <p>How can I express such command line for <code>convert</code> to convert them into two smaller formats with lower quality and resize:</p>
  
  <ol>
  <li>width = 900, height = 600</li>
  <li>height = 600, height = 900</li>
  </ol>
  
  <p>How to make this command line working only for horizontal images <code>w &gt; h</code>?</p>
  
  <p><code>convert *.jpg -resize 900x600 -quality 80 *.jpg</code>?</p>
  
  <p>I can not use such syntaxes:</p>
  
  <ol>
  <li><code>convert *.jpg -resize 50% -quality 80 *.jpg</code> - all image can have differen widths.</li>
  </ol>