Questions tagged [sips]

sips (Scriptable Image Processing System) 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.

SIPS stands for: Scriptable Image Processing System. SIPS was created because it was determined there was a need for a tool which would perform many common operations on image files in a scriptable manner.

As it stands, there are a number of existing technologies which provide for manipulations of images. For example, ColorSync Scripting can perform many ColorSync operations such as color-matching of images, but it can't rotate, scale or convert formats. Image Capture Scripting can rotate and scale images, but it can't color match or convert formats. Finally, the Preview application can rotate, scale and covert formats, but it is not Apple-scriptable.

SIPS brings all these different technologies together to provide a single tool with which to perform common operations on images. The current feature set for SIPS includes:

  • Read, write or convert different raster image formats

  • jpeg (Jfif & Xiff), TIFF, GIF, PNG

  • Basic image operations

  • Rotate, flip, crop, pad, resample, change dpi

  • Color management operations

  • Embed, extract or match to profiles

  • Read or write known metadata tags

  • Preserve original content whenever possible

Possible features for future releases of SIPS include:

  • Support for complex formats

  • Multilayer, multipage or vector-based

  • Advanced image operations

  • Blur, sharpen, ehnance, etc.

  • Read or write any metadata tag (list of metadata tags is always increasing, contact dts@apple.com to suggest additional tags)

SIPS is currently implemented as a simple compiled tool, which is installed in /usr/bin/sips. It links against CoreGraphics, QuickTime and ColorSync. It can operate on one or more file at a time. It can query or modify images or profiles. SIPS queries can return properties in simple text form or in XML form. Actions can modify files in-place or to an output directory.

Because SIPS is a simple command line tool there's lots of ways to use it. It can be invoked from the terminal shell, from AppleScript, from other scripting languages or from an application using C code (AppKit or Posix calls).

41 questions
112
votes
2 answers

How can I convert an image to grayscale via the command line?

How can I use sips, imagemagic, or another tool to convert an image to black and white (grayscale) via the command line?
cwd
  • 53,018
  • 53
  • 161
  • 198
17
votes
6 answers

Use sips command on mac to trim bottom of image

I want to write a batch command script for osx that will crop off the bottom of an image. Is that possible using sips? I have a bunch of images 640 x 1136 and I want crop them (not scale or resize) to 640 x 960. When the image is cropped, I want…
Dev01
  • 13,292
  • 19
  • 70
  • 124
7
votes
2 answers

sips shows Unable to render destination image

I had used sips to resize PNG image as below command. sips -z 768 1024 image.png --out image-resize.png It works well. But today I got an error message as shown in below [
Daniel Lu
  • 189
  • 1
  • 14
5
votes
1 answer

Using sips to create an icns file from a png file

I can make a jpeg from a png: sips -s format jpeg myIcon.png --out myIcon.jpeg But the same command won't work on icns: sips -s format icns myIcon.png --out myIcon.icns # Error: Unable to write image to file ...myIcon.icns How can I get around…
Kevin Kostlan
  • 3,311
  • 7
  • 29
  • 33
4
votes
1 answer

How can I add a transparent OS X style border to an image using command line tools?

I have images and want to add a transparent gradient background to them, similar to the way OS X does with window shadows. Is there a way I can use something like mogrify or sips to add this border? The images I want to process are not screenshots,…
cwd
  • 53,018
  • 53
  • 161
  • 198
4
votes
3 answers

Can you remove the alpha channel in a PNG with SIPS?

Trying to stay native in SIPS when removing the alpha channel from images I am familiar with the process in ImageMagick with: convert -flatten test.png test-white.png or: convert test.png -background white -alpha remove test.png but when I…
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
3
votes
1 answer

Apple's SIPS tool on CentOS?

I just discovered Apple's sips tool (Scriptable Image Processing System), and saw one person mention it is about 5x faster than ImageMagick for resizing images. We have been using ImageMagick for years on our production CentOS servers and are happy…
Abhi Beckert
  • 32,787
  • 12
  • 83
  • 110
3
votes
1 answer

Batch process images using OS X SIPS (scriptable image processing system) to downsize images only?

I'd like to batch process several folders of 1000's of images to downsize any images with a long side greater than 1440 pixels down to 1440 while ignoring any files that are already smaller than that. I was looking at sips and can't tell if it skips…
jb510
  • 358
  • 1
  • 18
2
votes
2 answers

Convert a PDF to Images using sips

I want to convert a pdf with several pages to single image files using sips. I know there are several other (probably better) solutions to do this but sips is installed on every mac and don't need a licence. What I tried: sips -s format png…
Silvan
  • 395
  • 2
  • 14
2
votes
0 answers

Create high resolution jpegs from PDF using sips on OSX

I need the ability to create very high res zoomed jpegs from PDF documents. I have been able to do it using ghostscript with good results - placed images scale up adequately, fonts render smoothly at the zoomed in resolution. Unfortunately I have…
Gareth Simpson
  • 36,943
  • 12
  • 47
  • 50
2
votes
1 answer

Terminal: Use image information from sips for renaming files

The command sips has a great option to read information from files. The following command loops through all images and shows information on the width or height: for i in *.jpg; do sips -g pixelWidth $i;done for i in *.jpg; do sips -g pixelHeight…
Phlow
  • 688
  • 4
  • 14
2
votes
0 answers

Which algorithm is used by os x yosemite in SIPS -z to resize image?

I am trying to find out which algorithm is used to resize image when I called sips -z function from the terminal mac os x yosemite. It seems Lanczos algorithm used in vImage framework. And it is claimed as "vImage’s geometry transforms usually look…
user2616232
  • 661
  • 1
  • 9
  • 14
2
votes
1 answer

SIPS image resize for batch size and namming

I would like a quick/simple way to use SIPS to resize images to the sizes I want. Currently- I have to do each file one-by-one, including runnings the sips command, then renaming the file and copying it to another directory. Ideally- I could…
Yian
  • 189
  • 14
2
votes
1 answer

Difference between SIP and SIPS URI?

I am reading SIP RFC 3261. I didn't get the difference between sip uri and sips uri. Can Some one help.
roottraveller
  • 7,942
  • 7
  • 60
  • 65
2
votes
1 answer

mac sips program seems to ignore --padColor option

I have a 128x256 png file I am trying to pad to 512x512 with sips but sips always seems to pad with transparency rather than the specified padColor. What am I doing wrong? sips junk-128x256.png --padToHeightWidth 512 512 --padColor 00FF00 --out…
Glenn
  • 1,996
  • 2
  • 24
  • 32
1
2 3