tldr/pages/osx/sips.md

30 lines
987 B
Markdown
Raw Normal View History

2018-03-23 08:52:50 +00:00
# sips
> Apple Scriptable Image Processing System.
> Raster/Query images and ColorSync ICC Profiles.
2022-02-14 11:21:43 +00:00
> More information: <https://ss64.com/osx/sips.html>.
2018-03-23 08:52:50 +00:00
- Specify an output directory so that originals do not get modified:
`sips --out {{path/to/out_dir}}`
- Resample image at specified size, Image aspect ratio may be altered:
2022-02-14 11:21:43 +00:00
`sips --resampleHeightWidth {{1920}} {{300}} {{image.ext}}`
2018-03-23 08:52:50 +00:00
- Resample image so height and width aren't greater than specified size (notice the capital Z):
2022-02-14 11:21:43 +00:00
`sips --resampleHeightWidthMax {{1920}} {{300}} {{image.ext}}`
2018-03-23 08:52:50 +00:00
- Resample all images in a directory to fit a width of 960px (honoring aspect ratio):
2018-03-23 08:52:50 +00:00
`sips --resampleWidth {{960}} {{path/to/images}}`
- Convert an image from CMYK to RGB:
2022-02-14 11:21:43 +00:00
`sips --matchTo "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" {{path/to/image.ext}} {{path/to/out_dir}}`
2018-03-23 08:52:50 +00:00
- Remove ColorSync ICC profile from an image:
2022-02-14 11:21:43 +00:00
`sips --deleteProperty profile --deleteColorManagementProperties {{path/to/image.ext}}`