sips(1) General Commands Manual sips(1)

sipsscriptable image processing system.

sips [image-functions] imagefile ...

sips [profile-functions] profile ...

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. It also supports executing JavaScript to either modify or generate images.

Profile query functions:

key
 
key
Output the property value for key to stdout.

tag tagFile
 
tag tagFile
Write a profile tag element to tagFile.

Verify any profile problems and log output to stdout.

 
Output for each file on a single line with tab delimiter

Image query functions:

key
 
key
Output the property value for key to stdout.

profile
 
profile
Get the embedded profile from image and write it to profile.

 
Output for each file on a single line with tab delimiter

Profile modification functions:

key value
 
key value
Set a property value for key to value.

key
 
key
Remove a property value for key.

tag
Remove the tag element from a profile.

srcTag dstTag
Copy the srcTag element of a profile to dstTag.

tag tagFile
Set the tag element of a profile to the contents of tagFile.

Repair any profile problems and log output to stdout.

file-or-directory
 
file-or-directory
 

Image modification functions:

key value
 
key value
Set a property value for key to value.

key
 
key
Remove a property value for key.

profile
 
profile
Embed profile in image.

profile
 
profile
Embed profile in image only if image doen't have a profile.

profile
 
profile
Color match image to profile.

profile intent
 
profile intent
Color match image to profile with rendering intent perceptual | relative | saturation | absolute.

Delete color management properties in TIFF, PNG, and EXIF dictionaries.

degreesCW
 
degreesCW

horizontal|vertical
 
horizontal|vertical

pixelsH pixelsW
 
pixelsH pixelsW
Crop image to fit specified size.

offsetY offsetH
Crop offset from top left corner.

pixelsH pixelsW
 
pixelsH pixelsW
Pad image with pixels to fit specified size.

hexcolor
Use this color when padding. White=FFFFFF, Red=FF0000, Default=Black=000000

pixelsH pixelsW
 
pixelsH pixelsW
Resample image at specified size. Image apsect ratio may be altered.

pixelsW
Resample image to specified width.

pixelsH
Resample image to specified height.

pixelsWH
 
pixelsWH
Resample image so height and width aren't greater than specified size.

 
Add a Finder icon to image file.

Optimize color for sharing.

file-or-directory
 
file-or-directory

file
 
file
Execute JavaScript file

Other functions:

Enable debugging output

 
Show help

 
Show help for properties

Generate man pages

 
Show the version

Show the read/write formats

HTML Canvas objects can be created and used to create a 2D drawing context. The commands for drawing into the context are well documented elsewhere. This section will describe the sips global object and other interesting classes.

Global variable (sips) properties

images
Valid images passed as arguments converted into an array of Image objects
arguments
Arguments passed into the program as an array of strings
size
Recommended size for output. Setting the crop or resample flags will set this value.
longestEdge
If specified, the value of the -Z/--resampleHeightWidthMax option. [default: 0]
outputPath
Output directory [default: current directory]

Image Object

name
Name of image
size
Size of image (pixels)
properties
Image properties
getProperty(name)
Return the image property for name, if any.
sizeToFitLongestEdge(length)
Return the size that will contain the image with the longest edge set to length. Maintains aspect ratio.

Output Object

new Output(context, name[, type])
Output the context to disk with name and optional type (extension or UTI).
addToQueue()
Adds the output to the queue to be written to disk.

Functions

print(str)
Output to standard output. Equivalent to console.log(str).

The commands --getProperty, --setProperty, and --deleteProperty can use one of the following keys as a parameter.

Special property keys:

all
binary data
allxml
binary data

Image property keys:

dpiHeight
float
dpiWidth
float
pixelHeight
integer (read-only)
pixelWidth
integer (read-only)
typeIdentifier
string (read-only)
format
string jpeg | tiff | png | gif | jp2 | pict | bmp | qtif | psd | sgi | tga
formatOptions
string default | [low|normal|high|best|<percent>] | [lzw|packbits]
space
string (read-only)
samplesPerPixel
integer (read-only)
bitsPerSample
integer (read-only)
creation
string (read-only)
make
string
model
string
software
string (read-only)
description
string
copyright
string
artist
string
profile
binary data
hasAlpha
boolean (read-only)

Profile property keys:

description
utf8 string
size
integer (read-only)
cmm
string
version
string
class
string (read-only)
space
string (read-only)
pcs
string (read-only)
creation
string
platform
string
quality
string normal | draft | best
deviceManufacturer
string
deviceModel
integer
deviceAttributes0
integer
deviceAttributes1
integer
renderingIntent
string perceptual | relative | saturation | absolute
creator
string
copyright
string
md5
string (read-only)
7/10/05 Darwin