Skip to content

sips MacOS Command Guide

The MacOS sips command is a powerful utility that allows users to manipulate images directly from the command line. With sips, you can resize, rotate, convert, and even apply various image filters to your pictures. This command provides a fast and efficient way to make bulk changes to images without the need for a graphical user interface. Whether you need to quickly resize a batch of images or convert them to a different file format, sips can handle it all. By understanding how to use the sips command effectively, you can streamline your image editing workflow and save time on repetitive tasks.

sips Syntax:

Terminal window
sips [option] [parameter]

Options:

OptionDescription
-s, —setPropertySet the value of a property
-d, —deletePropertyDelete a property
-g, —getPropertyGet the value of a property
-i, —infoGet properties of an image
-m, —matchFind images with matching properties
-r, —rotateRotate an image
-f, —flipFlip an image
-c, —cropCrop an image
-z, —zoomZoom an image
-p, —padPad an image
-l, —resampleWidthScale to specified width and resolution
-h, —resampleHeightScale to specified height and resolution
-g, —resampleScale to specified width and resolution
-S, —standardizeMake a standard conforming image
-s, —matchToScale proportionally to fit into box
-Y, —resampleWAndHScale to specified width and height

Parameters:

ParameterDescription
Path to the image file
widthWidth in pixels
heightHeight in pixels
scaleFactorScale factor
angleRotation angle in degrees
cropWidthWidth of the cropped area
cropHeightHeight of the cropped area
startXX-coordinate of the top-left corner of the crop
startYY-coordinate of the top-left corner of the crop
padToWidthWidth to pad the image to
padToHeightHeight to pad the image to

sips Command Samples:

Convert an Image to JPEG Format

Terminal window
sips -s format jpeg input.png --out output.jpg

Converts an image from PNG to JPEG format.

Resize an Image to a Specific Width and Height

Terminal window
sips -Z 800 -c 600 input.jpg --out output.jpg

Resizes an image to a specific width of 800 pixels and height of 600 pixels.

Rotate an Image by 90 Degrees

Terminal window
sips -r 90 input.jpg --out output.jpg

Rotates an image by 90 degrees clockwise.

Display Information About an Image File

Terminal window
sips -g all input.jpg

Displays detailed information about the specified image file.

Change the Resolution of an Image

Terminal window
sips -r 300 input.jpg

Changes the resolution of the image to 300 pixels per inch.

Convert an Image to Black and White

Terminal window
sips -s formatOptions 0 input.jpg --out output.jpg

Converts a color image to black and white.

Crop an Image to a Specific Size

Terminal window
sips -c 100 100 400 300 input.jpg --out output.jpg

Crops the image to a specific size starting at coordinates (100, 100) and ending at (400, 300).

sips FAQ:

How do I use sips in MacOS?

To use the sips command in MacOS, execute the following command:

Terminal window
sips --option <value>

What is the purpose of the sips command in MacOS?

The sips command in MacOS is used to query or modify raster image files.

How can I view information about an image file using sips in MacOS?

You can view information about an image file by running the following command:

Terminal window
sips -g all /path/to/image.jpg

How do I resize an image using sips in MacOS?

To resize an image using sips, you can use a command like the following:

Terminal window
sips -Z 800 /path/to/image.jpg

Can I convert an image format using sips in MacOS?

Yes, you can convert an image format using sips by running a command similar to the following:

Terminal window
sips -s format png /path/to/image.jpg --out /path/to/newimage.png

How do I rotate an image using sips in MacOS?

You can rotate an image using sips by executing a command like the following:

Terminal window
sips -r 90 /path/to/image.jpg

Applications of the sips command

  • Image conversion
  • Image information retrieval
  • Batch processing of images
  • Image format transformation
  • Image size adjustment