Batch processing of images on Mac

Source: Internet
Author: User

Fjh-Mac-Pro: 2013_04_27 fengjianhua $ sips -- Help
Sips 10.4.4-Scriptable image processing system.
This tool is used to query or modify Raster image files and ColorSync ICC profiles.
Its Functionality can also be used through the "image events" applescript suite.

Usages:
Sips [-h, -- help]
Sips [-h, -- helpproperties]

Sips [Image-query-functions] imagefile...

Sips [Profile-query-functions] profile...

Sips [Image modification functions] imagefile...
[-- Out result-file-or-Dir]

Sips [profile modification functions] profile...
[-- Out result-file-or-Dir]

Profile query functions:
-G, -- getproperty key
-X, -- extracttag tagfile
-V, -- verify

Image query functions:
-G, -- getproperty key
-X, -- extractprofile Profile

Profile Modification functions:
-S, -- setproperty key value
-D, -- deleteproperty key
-- Deletetag tag
-- Copytag srctag dsttag
-- Loadtag tag tagfile
-- Repair

Image modification functions:
-S, -- setproperty key value
-D, -- deleteproperty key
-E, -- embedprofile Profile
-E, -- embedprofileifnone Profile
-M, -- matchto Profile
-M, -- matchtowithintent profile intent
-- Deletecolormanagementproperties
-R, -- rotate degreescw
-F, -- flip horizontal | vertical
-C, -- croptoheightwidth pixelsh pixelsw
-P, -- padtoheightwidth pixelsh pixelsw
-- Padcolor hexcolor
-Z, -- resampleheightwidth pixelsh pixelsw
-- Resamplewidth pixelsw
-- Resampleheight pixelsh
-Z, -- resampleheightwidthmax pixelswh

-I, -- addicon

Is there a way to quickly narrow down the image size on Mac?
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/fengjianhua ):
Sips-Z 600 ~ /Desktop/fengjianhua/*. jpg
After the script is executed, all JPG images in the fengjianhua folder on your desktop are reduced to a small version with a width of 600px. In addition, SIPs has many functions to be explored. For example, you can specify the height and width (note that Z must be in lowercase ):
Sips-Z 300 600 ~ /Desktop/fengjianhua/*. 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/fengjianhua/*. jpg
In fact, you can even rotate 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. The command for horizontal flip is:
Sips-F horizontal ~ /Desktop/fengjianhua/*. jpg
Vertical flip command:
Sips-F vertical ~ /Desktop/fengjianhua/*. jpg

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.