This is the script that I use for mac images.