sips

sips

 sips [-h  --help  -H  --helpProperties] sips [--debug] { -g  --getProperty }   property image_or_profile_filename   ... sips [--debug] { -x  --extractProfile }   profile_filename image_filename   ... sips [--debug] { -X  --extractTag }   tag tag_filename profile_filename   ... sips [--debug] { -v  --verify }   profile_filename   ... sips [--debug] { -s  --setProperty }   property value   [--out   filename   ]   image_or_profile_filename   ... sips [--debug] { -d  --deleteProperty }   property   [--out   filename   ]   image_or_profile_filename   ... sips [--debug] { -r  --rotate }   degrees   [--out   filename   ]   image_filename   ... sips [--debug] { -f  --flip } { horizontal  vertical } [--out   filename   ]   image_filename   ... sips [--debug] { -c  --cropToHeightWidth  -p  --padToHeightWidth   -z  resampleHeightWidth }   height_pixels width_pixels   [--out   filename   ]   image_filename   ... sips [--debug] { -Z  --resampleHeightWidthMax  --resampleHeight   --resampleWidth }   pixels   [--out   filename   ]   image_filename   ... sips [--debug] { -i  --addIcon } [--out   filename   ]   image_filename   ... sips [--debug] { -e  --embedProfile  -E  --embedProfileIfNone  -m   --matchTo }   profile_filename   [--out   filename   ]   image_filename   ... sips [--debug] { -M  --matchToWithIntent }   profile_filename   { absolute   relative  perceptual  satuation } [--out   filename   ]   image_filename   ... sips [--debug] --deleteTag   tag   [--out   filename   ]   profile_filename   ... sips [--debug] --copyTag   src_tag dst_tag   [--out   filename   ]   profile_filename   ... sips [--debug] --loadTag   tag tag_filename   [--out   filename   ]   profile_filename   ... sips [--debug] --repair [--out   filename   ]   profile_filename   ... 

Description

The Scriptable Image Processing System (SIPS) tool can be used to manipulate images and ColorSync profiles from the command line.

ColorSync profiles are International Color Consortium (ICC) files that characterize the color properties of different devices, so that accurate color matching can be performed between them. There are ColorSync profiles located under /System/Library/ColorSync/Profiles/ , /Library/ColorSync/Profiles/ , /Library/Printers/ , and /Library/Image Capture/Devices/ , among other places. For more on ColorSync, see http://www.apple.com/macosx/features/colorsync/.


Options/Usage


-c --cropToHeightWidth

Crops an image to the specified size (in pixels). The image is cropped equally from both top and bottom, and from both sides.


--copyTag

Copies the value of a tag in a ColorSync profile to another tag in the same profile.


-d --deleteProperty

Deletes the specified property. A list of possible properties may be obtained with sips -H .


--debug

Enables debugging output.


--deleteTag

Deletes the specified tag from a ColorSync profile.


-e --embedProfile

Embeds the specified ColorSync profile into the image.


-E --embedProfileIfNone

Embeds the specified ColorSync profile into the image only if another profile is not already embedded.


-f --flip

Flips an image in the specified direction.


-g --getProperty

Prints the value of the specified property to standard output. A list of possible properties may be obtained with sips -H .


-h --help

Prints a usage message to standard output.


-H --helpProperties

Prints a list of image and profile properties to standard output.


-i --addIcon

Adds an icon for an image file to its resource fork, which is used in Finder previews.


--loadTag

Copies the value of a tag from a file to a ColorSync profile. (This is the opposite of --extractTag .)


-m --matchTo

Matches an image to the specified ColorSync profile.


-M --matchToWithIntent

Matches an image to the specified ColorSync profile with the given rendering intent. (Note the misspelled satuation ; this is a typo in the sips code.)


--out

Specifies the filename of the modified image file. By default, sips modifies the file in place; this option lets you save the modified file under a different name , leaving the original unchanged.


-p --padToHeightWidth

Pads an image with blank space to the specified size (in pixels). The image is padded equally on both top and bottom, and on both sides.


-r --rotate

Rotates an image the specified number of degrees clockwise.


--repair

Attempts to repair a malformed desc tag in a ColorSync profile. This option is the same as the Repair operation under Profile First Aid in the ColorSync Utility application.


--resampleHeight

Stretches or compresses an image to the specified height (in pixels).


--resampleWidth

Stretches or compresses an image to the specified width (in pixels).


-s --setProperty

Sets a property to the specified value. A list of possible properties may be obtained with sips -H .


-v --verify

Verifies the syntax of a ColorSync profile. This option is the same as the Verify operation under Profile First Aid in the ColorSync Utility application.


-x --extractProfile

Copies an embedded ColorSync profile from an image to a file with the specified name.


-X --extractTag

Copies the value of a tag (such as desc ) from a ColorSync profile to a file with the specified name.


-z --resampleHeightWidth

Stretches or compresses an image to the specified size (in pixels).


-Z --resampleHeightWidthMax

Stretches or compresses an image while maintaining the aspect ratio. The largest dimension (height or width) is set to the specified size (in pixels).

Examples

Show the properties of a ColorSync profile (similar to what's displayed under the Profiles tab of the ColorSync Utility application):

 %  sips -g all /Library/ColorSync/Profiles/WebSafeColors.icc  /Library/ColorSync/Profiles/WebSafeColors.icc   size: 10644   cmm: appl   version: 2.2.0   class: nmcl   space: RGB   pcs: Lab   creation: 2003:07:01 00:00:00   platform: APPL   quality: normal   deviceManufacturer: 0   deviceModel: 0   deviceAttributes0: 0   deviceAttributes1: 0   renderingIntent: perceptual   creator: appl   md5: 14487F1ED8F8947B15F6682BFCF21E00   description: Web Safe Colors   copyright: Copyright 2001 - 2003 Copyright Apple Computer Inc., all rights reserved. 

Convert a TIFF to a JPEG from the command line (also works for PNG, GIF, PICT, BMP, and other image formats):

 %  sips -s format jpeg --out sample.jpeg sample.tiff  

Location

/usr/bin



Mac OS X Panther for Unix Geeks
Mac OS X Panther for Unix Geeks
ISBN: 0596006071
EAN: 2147483647
Year: 2003
Pages: 212

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net