gpt4 book ai didi

image - 如何在 Mac OSX 上使用终端调整图像大小?

转载 作者:行者123 更新时间:2023-12-03 05:43:36 25 4
gpt4 key购买 nike

如果需要,我需要一种简单且免费的方法来调整图像大小并执行批处理作业。免费图像处理软件的使用起来比应有的要复杂。

最佳答案

pointed out by LifeHacker ,以下命令将非常容易地完成此操作:

sips -Z 640 *.jpg

引用他们的解释:

sips is the command being used and -Z tells it to maintain the image's aspect ratio. "640" is the maximum height and width to be used and "*.jpg" instructs your computer to downsize every image ending in .jpg. It's really simple and shrinks your images very quickly. Be sure to make a copy first if you want to preserve their larger size as well.

下面是我们保留原始图像并将调整大小的图像发送到名为 resized 的子目录的示例:

mkdir -p resized && sips -Z 640 *.jpg --out resized/

关于image - 如何在 Mac OSX 上使用终端调整图像大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28489793/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com