SIPS property keys

Posted in SIPs on May 10, 2019 · 1 min read
What are some of the SIPS' processing keys I can use when looking at images?

In SIPS you can get information about an image with getProperty such as:

sips getProperty all img.jpg

and the above code will render everything associated with that file in the terminal. If you wanted a file to review instead of reading it through the terminal you can try:

sips getProperty all img.jpg >> result.txt

and where ever the image file is placed the above code will create a text file named result.txt with all the information in regards to the image.

Like other scripting languages there is a shorthand approach to calling getProperty and that is with -g:

sips -g all img.jpg

I am lazy so I will be demoing the short hand approach in this post and further posts that use SIPS. There are a number of options you can pass to getProperty when referencing the manual, which can be accessed by man sips but I prefer to have a reference point on what I can use separate then my terminal so I've included a table:

Special property keys
Property NameTypeRead Only
allbinary data
allxmlbinary data
Image property keys
dpiHeightfloat
dpiWidthfloat
pixelHeightintegeryes
pixelWidthintegeryes
typeIdentifierstringyes
formatstring
formatOptionsstring
spacestringyes
samplesPerPixelintegeryes
bitsPerSampleintegeryes
creationstringyes
makestring
modelstring
softwarestringyes
descriptionstring
copyrightstring
artiststring
profilebinary data
hasAlphabooleanyes
Profile property keys
descriptionutf8 string
sizeintegeryes
cmmstring
versionstring
classstringyes
spacestringyes
pcsstringyes
creationstring
platformstring
qualitystring
deviceManufacturerstring
deviceModelinteger
deviceAttributes0integer
deviceAttributes1integer
renderingIntentstring
creatorstring
copyrightstring
md5stringyes

While I am still learning how to use SIPS myself do keep in mind it isn't as robust as ImageMagick and though some of the features may be seen in both what I've experienced some could be read only and will require some additional work in either Bash or AppleScript. On the positive note, SIPS is pre-installed on your Mac, for Mavericks+ if I recall, so you do have the opportunity of greater success when deploying scripts to other users.

Help the site go ad free:
Storm Trooper