Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add use of ratio to -extent #80

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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