mac automator_如何在Mac上使用Automator批量调整图像大小
mac automator
Having to open a whole bunch of images just to resize and save them again is a pain. Luckily, Apple’s built-in Automator tool can streamline this process, letting you select a group of images and resize them all at once—automatically.
不得不打开一堆图像只是为了调整大小并再次保存它们是一种痛苦。 幸运的是,Apple内置的Automator工具可以简化此过程,使您可以选择一组图像并自动一次调整所有图像的大小。
第一步:设置新服务 (Step One: Set Up a New Service)
First, launch Automator (Command+Space, then type “Automator”), and create a new service.
首先,启动Automator(Command + Space,然后键入“ Automator”),然后创建一个新服务。
Services are like little programs that you can run by right-clicking a file, or from the app’s menu.
服务就像小程序,您可以通过右键单击文件或从应用程序的菜单中运行它们。
The first thing you need to set up a service is an input, and our input will be image files.
设置服务的第一件事是输入,而我们的输入将是图像文件。
Now that you’ve set the input, you’ll tell Automator what to do with files.
现在,您已经设置了输入,您将告诉Automator如何处理文件。
In the search box at the top of the left pane, type “Scale Images” and then drag the “Scale Images” action into the main panel. Automator will prompt you to add a block to copy files over before resizing, which is handy to prevent accidental resizing, such as missing a 0 and losing all the image quality. By default, the action will just make copies of the resized images and save them to the desktop (or another folder of your choice). If you want to resize them in place and replace the originals, leave this copy block out.
在左窗格顶部的搜索框中,键入“缩放图像”,然后将“缩放图像”操作拖到主面板中。 Automator会提示您添加一个块以在调整大小之前复制文件,这对于防止意外调整大小非常方便,例如丢失0并丢失所有图像质量。 默认情况下,该操作将仅复制已调整大小的图像并将其保存到桌面(或您选择的另一个文件夹)。 如果要调整尺寸并替换原件,请将该副本块排除在外。
You should now have two actions in the service. To make it work, click “Options” on the Scale Images service, and select “Show this action when the workflow runs.”
现在,您应该在服务中执行两个操作。 要使其工作,请在“缩放图像”服务上单击“选项”,然后选择“在工作流运行时显示此操作”。
This will make the service open a dialog asking for the image size. If you’d rather stick to a single size, you can leave this unchecked and type in the size you always want to use.
这将使服务打开一个对话框,询问图像大小。 如果您希望使用单个尺寸,可以不选择此尺寸,然后输入您一直想使用的尺寸。
When you’re done, save the service and name it whatever you’d like—we’re going with “Resize.”
完成后,保存服务并命名为任意名称-我们将使用“调整大小”。
第二步:使用新服务 (Step Two: Put Your New Service to Use)
Right click on any image, point to the “Services” option at the bottom of the context menu, and then choose “Resize”—or whatever you named your service.
右键单击任何图像,指向上下文菜单底部的“服务”选项,然后选择“调整大小”或任何您命名的服务。
You should see it copy the file over and then resize it. Bear in mind that the scale function resizes based on aspect ratio. If your image is landscape-oriented, it’ll resize the width; if it’s portrait-oriented, it’ll resize the height.
您应该看到它复制了文件,然后调整了大小。 请记住,缩放功能会根据宽高比调整大小。 如果您的图片是横向的,则会调整宽度; 如果是纵向的,它将调整高度。
You can also assign a keyboard shortcut to the service if you want by heading to System Preferences > Keyboard > Shortcuts > Services.
如果需要,您还可以将键盘快捷方式分配给服务,方法是转到系统偏好设置>键盘>快捷方式>服务。
翻译自: https://www.howtogeek.com/363868/how-to-batch-resize-images-with-automator-on-mac/
mac automator