MacOS – How to remove a ColorSync profile from a JPEG image from Terminal in El Capitan

bashmacosterminal

I have several images that I would like to strip the ColorSync profile from. Eventually, I would like to automate this in bash so I could easily process this on a file or folder from the contextual menu using an Automator service.

How do I strip a color profile from an image file using Terminal?

Best Answer

Use sips (scriptable image processing system) to remove an ICC color profile from an image file in El Capitan. sips does a ton of other stuff as well.

To remove the ColorSync ICC profile from an image:

sips -d profile --deleteColorManagementProperties <imagefile>

Example:

MyFILE="${HOME}/Pictures/RemoveMyColorSyncProfile.jpg";
sips -d profile --deleteColorManagementProperties "${MyFILE}";

It appears to support the following image types, but I'm basing this on the format image property key (see Options in the man page):

  • jpeg
  • tiff
  • png
  • gif
  • jp2
  • pict
  • bmp
  • qtif
  • psd
  • sgi
  • tga

See the man page for more info, or use sips -h for help to stdout.