SIPS (Scriptable Image Processing System) is a command-line utility available on macOS that enables users to perform various image manipulation tasks directly from the command line. It supports a wide range of image file formats, including JPEG, PNG, TIFF, GIF, and more
- Scale an image (without aspect ratio):
sips -z width height input_image --out output_image
- Scale an image (maintain aspect ratio):
sips -z 800 0 original.jpg --out scaled.jpg
- Query image properties:
sips -g dpiHeight -g dpiWidth image.jpg
% sips -g dpiHeight -g dpiWidth PosterArtWaterColorCanyon.jpg
/tmp/PosterArtWaterColorCanyon.jpg
dpiHeight: 72.000
dpiWidth: 72.000
%
- Change image format:
sips -s format jpeg picture.png --out picture.jpg
- Rotate image:
sips --rotate 45 image.jpg --out rotated_image.jpg
- Resize image:
sips --resampleHeightWidth 1920 300 image.jpg --out resized_image.jpg
- Crop image:
sips --cropToHeightWidth 100 100 image.jpg --out cropped_image.jpg
- Show help:
sips -h or sips -H
- Verify image:
sips -v image.jpg
- Extract embedded profile from image:
sips -x profile image.jpg