title: Convert image from 4500x5400 to 4050x4200 keeping aspect ratio
body: <p>I have an image of 4500x5400, I want to resize it for the height 4200 keeping the width ratio, however the width of the image needs to be 4050, leaving the sides transparent.</p>
  
  <p>I have this ImageMagick command:</p>
  
  <pre><code>convert file.png -resize 4500x5400 -gravity center -background transparent -extent 4050x4200 out.png
  </code></pre>
  
  <p><br>
  However it's cutting the top and the bottom, while it needs to appear.</p>
  
  <p>Do you guys have any idea of how I can make it work?</p>
  
  <p>Appreciate your time!</p>