Using sips to batch-resize photos

Using man sips to get detailed manual.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
NAME
     sips -- scriptable image processing system.

SYNOPSIS
     sips [image-query-functions] imagefile ...
     sips [profile-query-functions] profile ...
     sips [image-modification-functions] imagefile ... [--out result-file-or-dir]
     sips [profile-modification-functions] profile ... [--out result-file-or-dir]

DESCRIPTION
     This tool is used to query or modify raster image files and ColorSync ICC profiles.  Its functionality
     can also be used through the "Image Events" AppleScript suite.
...

Among the parameters, -z (-Z) can be used to resize images.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
     -z pixelsH pixelsW
     --resampleHeightWidth pixelsH pixelsW
           Resample image at specified size. Image apsect ratio may be altered.

     --resampleWidth pixelsW
           Resample image to specified width.

     --resampleHeight pixelsH
           Resample image to specified height.

     -Z pixelsWH
     --resampleHeightWidthMax pixelsWH
           Resample image so height and width aren't greater than specified size.

For instance:

sips -Z 3000 *.jpg

to limit the largest to 3000.

comments powered by Disqus
CC-BY-NC 4.0
Built with Hugo Theme Stack