gs-resize-with-cropping(1)

NAME
gs-resize-with-cropping - resizes an image, including cropping to fit a changed aspect ratio.

SYNOPSIS
gs-resize-with-cropping input_filename output_filename
[-A aspect_ratio | - -aspect aspect_ratio]
[-A H:V|HxV | - -aspect H:V|HxV]
[-A A0|...|A9|An | - -aspect A0|...|A9|An]
[-A keep | - -aspect keep]
[-W new_width | - -width new_width]
[-H new_height | - -height new_height]
[-q | - -quiet] [-w | - -verbose]
gs-resize-with-cropping [-h | - -help]
gs-resize-with-cropping [-v | - -version]

DESCRIPTION
gs-resize-with-cropping resizes an image, including cropping to fit a changed aspect ratio.

ARGUMENTS
The following options are available:

input_filename
    The input image. Any format supported by GraphicsMagick can be used. The format will be detected automatically.

output_filename
    The name for the output image to be written. Any format supported by GraphicsMagick can be used. The format will be detected by the provided file name extension (e.g. .jpeg, .png, .webp, .pdf, ...). An existing output file will be overwritten.

-A aspect_ratio | - -aspect aspect_ratio
    Specifies the aspect ratio directly as value (e.g. 1.414214).

-A H:V|HxV | - -aspect H:V|HxV
    Specifies the aspect ratio as H:V or HxV (e.g. 16:9 or 16x9).

-A A0|...|A9|An | - -aspect A0|...|A9|An
    Specifies the aspect ratio as DIN An format ratio (A1, A2, ..., A9, or An; i.e. sqrt(2):1 ≈ 1.414213562373).

-A keep | - -aspect keep
    Leaves the aspect ratio unchanged. This is the default.

-W new_width | - -width new_width
    Specifies the new width. Then, the new height is calculated based on the configured aspect ratio.

-H new_height | - -height new_height
    Specifies the new height. Then, the new width is calculated based on the configured aspect ratio.

-q | - -quiet
    Quiet mode: suppress status output. This is the default.

-w | - -verbose
    Verbose mode: print status output and processing details.

-h | - -help
    Prints the program's command-line parameters and exits.

-v | - -version
    Prints the program version and exits.

EXIT STATUS
The gs-resize-with-cropping tool exits with 0 on success, and >0 in case of an error.

EXAMPLES

gs-resize-with-cropping Bergen.jpeg Bergen-1920-4:3.webp --aspect 4:3 --width 1920 --verbose

gs-resize-with-cropping Bergen.jpeg Bergen-1920-16:9.png -A 16x9 -W 1920

gs-resize-with-cropping Bergen.jpeg Bergen-3860-A3.pdf --aspect A3 --width 3840

gs-resize-with-cropping Bergen.jpeg Bergen-1024-An.jpeg -A 1.414214 -W 1024

gs-resize-with-cropping Portobello.jpeg Portobello-2048-16:9.jpeg -A 16:9 --width 2048 -v

gs-resize-with-cropping --help

gs-resize-with-cropping -h

gs-resize-with-cropping --version

gs-resize-with-cropping -v

SEE ALSO
gs-bumpmap(1), gs-caption(1), gs-clothify(1), gs-glossytext(1), gs-mosaic(1), gs-oilify(1), gs-oldphoto(1), gs-test-gimp(1)

NOTES
This program is part of System-Tools. The latest version of System-Tools can be found on the System-Tools Homepage at System-Tools Homepage: https://www.nntb.no/~dreibh/system-tools/.

AUTHORS
Thomas Dreibholz, Homepage: https://www.nntb.no/~dreibh