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