Use the sips command in OS X to process images in batches

Source: Internet
Author: User


In OS X systems, the sips command is used to batch process images www.2cto.com. Many people may have the need to batch process image sizes at work, especially for network editing such as small editors, images exported directly from the camera are usually of a large size. If they are pasted on a webpage, they will be slow to access. Is there a way to quickly narrow down the image size in Mac? Of course! You only need a simple terminal command "sips. For example, if you want to scale down the n-size JPG images in a folder to PX in width, the height is automatically scaled proportionally. Then the command is (assuming the path of the folder is ~ /Desktop/Test): sips-Z 600 ~ After the execution of/Desktop/Test/*. JPG is complete, all JPG images in the Test folder on your Desktop are scaled down to a small version with a width of PX. In addition, there are many functions to be explored in sips. For example, you can specify the height and width (note that z must be in lowercase): sips-z 300 600 ~ /Desktop/Test/*. JPG you can also use the sips command to rotate images in batches. The default rotation mode is clockwise. The following method rotates the image 90 degrees clockwise: sips-r 90 ~ /Desktop/Test/*. JPG in fact, you can even rotate it at an irregular angle, such as rotating 120 degrees. Let's try it on your own. It can also be used to flip an image, either horizontally or vertically. Command: sips-f horizontal ~ /Desktop/Test/*. JPG vertical flip command: sips-f vertical ~ /Desktop/Test/*. JPG. Remember this powerful command.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.