Identify an image’s color profile with AppleScript

Posted in AppleScript, SIPs on December 20, 2016 · 1 min read
When building digital content it is a good practice to know what the color profile of the images you're wanting to use are so they will play well in their medium.

Regularly I am delivered source files that use images with several variations of color profiles. While some of these profiles can range from CMYK, Grey scale or even LAB, when building digital content I like to make sure everything is RGB to produce a great user experience. Without opening every image in an application like Adobe Photoshop or building a shell script that identifies the profile with something like ImageMagick I wanted a built-in way to identify what the profile is. Below you will find my solution to identify color profiles by utilizing SIPs and Mac's labeling system. The script works by requesting the user to choose a directory and it will detect any file with a certain extension defined in the property imgCluster:

property jpgGroup : {"jpg", "jpeg", "JPG", "JPEG"}
property pngGroup : {"png", "PNG"}
property bmpGroup : {"bmp", "BMP"}
property tifGroup : {"tif", "TIF", "tiff", "TIFF"}
property imgCluster : jpgGroup & pngGroup & bmpGroup & tifGroup

The full script:

Help the site go ad free:
Storm Trooper