Skip to content

Commit

Permalink
add use of ration to -extent (#80)
Browse files Browse the repository at this point in the history
I'm aware that the beta has expanded capabilities for handling ratios, but this at least is a start and explains the current functionality.
  • Loading branch information
Jmuccigr authored Nov 17, 2021
1 parent 946fccf commit e90ff47
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/command-line-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -2964,14 +2964,23 @@ function (its frequency), and thus determines the number of 'waves' that will
specify how to compose the image with the background, use <a href="#compose"
>-compose</a>.</p>

<p>This command reduces or expands a JPEG image to fit on an 800x600
<p>The following command reduces or expands a JPEG image to fit on an 800x600
display. If the aspect ratio of the input image isn't exactly 4:3, then the
image is centered on an 800x600 black canvas: </p>

<ul><pre class="bg-light text-dark"><samp>magick input.jpg -resize 800x600 -background black -compose Copy \
-gravity center -extent 800x600 -quality 92 output.jpg
</samp></pre></ul>

<p>The command can also be used with a ratio. If the image is not already at that ratio,
it will be cropped to fit it. The <a href="#gravity">-gravity</a> setting has
the expected effects.

<p>The following command crops a JPEG image so that it has a 4:3 ratio:</p>

<ul><pre class="bg-light text-dark"><samp>magick input.jpg -extent 4:3 -quality 92 output.jpg
</samp></pre></ul>

<p><?php seeGeometry(); ?></p>

<div style="margin: auto;">
Expand Down

0 comments on commit e90ff47

Please sign in to comment.