tldr/pages.zh/osx/sips.md

30 lines
1.1 KiB
Markdown
Raw Normal View History

2019-03-15 03:44:16 +00:00
# sips
> 苹果的处理文件脚本系统。
> 光栅 / 查询图像 和 颜色同步 ICC 配置文件。
> 更多信息:<https://keith.github.io/xcode-man-pages/sips.1.html>.
2019-03-15 03:44:16 +00:00
- S 指定一个输出目录,这样原始文件就不会被修改:
2019-03-15 03:44:16 +00:00
2019-10-20 03:34:33 +01:00
`sips --out {{目标 / 文件夹 / 输出文件夹}}`
2019-03-15 03:44:16 +00:00
- 以指定的大小对图像重新采样,图像纵横比可能会更改:
2019-03-15 03:44:16 +00:00
`sips --resampleHeightWidth {{1920}} {{300}} {{图片文件。扩展名}}`
2019-03-15 03:44:16 +00:00
- 对图像重新取样,使高度和宽度不大于指定的大小(注意大写 Z
2019-03-15 03:44:16 +00:00
`sips --resampleHeightWidthMax {{1920}} {{300}} {{图片文件。扩展名}}`
2019-03-15 03:44:16 +00:00
- 对目录中的所有图像重新取样,以适应 960px 的宽度(保持纵横比):
2019-03-15 03:44:16 +00:00
2019-10-20 03:34:33 +01:00
`sips --resampleWidth {{960}} {{目标 / 文件夹 / 所有图片文件}}`
2019-03-15 03:44:16 +00:00
2022-03-27 06:25:15 +01:00
- 将图像从 CMYK 转换为 RGB
2019-03-15 03:44:16 +00:00
`sips --matchTo "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" {{目标 / 文件夹 / 图片。扩展}} {{目标 / 文件夹 / 输出文件夹}}`
2019-03-15 03:44:16 +00:00
- 从图像中删除 ColorSync ICC 配置:
2019-03-15 03:44:16 +00:00
`sips --deleteProperty profile --deleteColorManagementProperties {{目标 / 文件夹 / 图片。扩展}}`