Skip to content

Instantly share code, notes, and snippets.

@Keoven
Created May 6, 2012 03:23
Show Gist options
  • Save Keoven/2608208 to your computer and use it in GitHub Desktop.
Save Keoven/2608208 to your computer and use it in GitHub Desktop.
ICC Profile Converter
(*
Taken from: http://hintsforums.macworld.com/showthread.php?t=110246
Get additional profiles from:
http://www.adobe.com/support/downloads/detail.jsp?ftpID=3680
*)
property profilePath : "'/Library/ColorSync/Profiles/Adobe ICC Profiles (end-user)/CMYK/CoatedGRACoL2006.icc'"
on run
set chosenFile to choose file with prompt "Choose an image to embed with an CMYK Coated GRACoL2006 profile" default location (path to desktop folder) with multiple selections allowed
open chosenFile
end run
on open draggedItems
set pathList to {}
repeat with thisFile in (draggedItems as list)
set end of pathList to quoted form of POSIX path of thisFile
end repeat
-- make a space delimited list of file paths
set {tid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, " "}
set paths to pathList as text
set AppleScript's text item delimiters to tid
-- build the for loop for unix
set cmd to "for filePath in " & paths & "; do" & linefeed
set cmd to cmd & "sips --matchTo " & profilePath & " \"$filePath\"" & linefeed
set cmd to cmd & "done"
do shell script cmd
beep 2
end open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment