Skip to content

Instantly share code, notes, and snippets.

@singularitti
Created August 21, 2023 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save singularitti/bad1a3792d3544cf80d2cac915569115 to your computer and use it in GitHub Desktop.
Save singularitti/bad1a3792d3544cf80d2cac915569115 to your computer and use it in GitHub Desktop.
Resize images #Shell
# Resize the specified image, ignoring the previous aspect ratio
sips -z <height> <width> <image>
# Resize the largest side of the specified image, preserving the aspect ratio
sips -Z <size> <image>
# Crop the specified image to the given dimensions (relative to the center of the original image)
sips -c <height> <width> <image>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment