In addition to @bmike 's answer earlier, here's an AppleScript that automates the process of .icns creation.
set export_folder to choose folder with prompt "Please select export folder."
set isImage to false
repeat while isImage = false
set import_image to choose file with prompt "Please select image to covert."
try
tell application "Image Events"
launch
set test_image to open import_image
if resolution of test_image = {} or resolution of test_image = {0, 0} then
error ["Invalid Image"]
end if
set isImage to true
end tell
on error
tell application "System Events"
display dialog "Error: Selected file is invalid" with title "Error" with icon caution
end tell
end try
end repeat
try
tell application "Finder"
make new folder at export_folder with properties {name:"Icon.iconset"}
end tell
on error
tell application "System Events"
display dialog "Error: Folder \"Icon.iconset\" already exists, will overwrite unless canceled" with title "Error" with icon caution
end tell
end try
set export_folder_path to POSIX path of export_folder
set import_image_path to POSIX path of import_image
set icon_folder_path to POSIX path of export_folder_path & "/Icon.iconset"
do shell script "sips -z 16 16 " & import_image_path & " --out " & icon_folder_path & "/icon_16x16.png"
do shell script "sips -z 32 32 " & import_image_path & " --out " & icon_folder_path & "/icon_16x16@2x.png"
do shell script "sips -z 32 32 " & import_image_path & " --out " & icon_folder_path & "/icon_32x32.png"
do shell script "sips -z 64 64 " & import_image_path & " --out " & icon_folder_path & "/icon_32x32@2x.png"
do shell script "sips -z 128 128 " & import_image_path & " --out " & icon_folder_path & "/icon_128x128.png"
do shell script "sips -z 256 256 " & import_image_path & " --out " & icon_folder_path & "/icon_128x128@2x.png"
do shell script "sips -z 256 256 " & import_image_path & " --out " & icon_folder_path & "/icon_256x256.png"
do shell script "sips -z 512 512 " & import_image_path & " --out " & icon_folder_path & "/icon_256x256@2x.png"
do shell script "sips -z 512 512 " & import_image_path & " --out " & icon_folder_path & "/icon_512x512.png"
do shell script "cp " & import_image_path & " " & icon_folder_path & "/icon_512x512@2x.png"
do shell script "iconutil -c icns " & icon_folder_path & ";"
display notification "ICNS Creator has finished generating an ICNS" with title "ICNS Creator"