Edit me

Resizing images

To resize an image, use the predefined task resize.

By default, images are resized to 1280x768 (width x height).

anchor -t resize

We usually instead specify a different target size with the -ps command-line option which offers multiple possibilities.

Resizing with a scaling factor

To resize to half the existing width and height:

anchor -t resize -ps 0.5

To resize to double the existing width and height:

anchor -t resize -ps 2

Resizing to a specific width and height

To resize to specifically 1024x768 (width x height), breaking aspect ratio if necessary.

anchor -t resize -ps 1024x768

Resizing preserving aspect ratio

To resize to 800 pixels width, preserving existing aspect ratio.

anchor -t resize -ps 800x

To resize to 600 pixels height, preserving existing aspect ratio.

anchor -t resize -ps x600

To resize to the maximal-size possible, preserving existing aspect ratio, that fits inside 1000x900.

anchor -t resize -ps 1000x900+

Resizing to preserve file-names and any non-image files

The following command immutably resizes images from a source directory into a destination directory, preserving filenames, directory-structure and any adjacent non-image files.

anchor -i c:\foo\source\ -ip -ic -t resize -ps 250x350 -oo c:\bar\destination\