Install png package in macOsX
 1- install Xcode from app store (take care, it is 4 GB !)   2- Open Xcode from application folder and install line command tools   3- Open terminal and enter:  sudo xcodebuild -license   4- Go to the end and enter agree   5- Install macport  https://www.macports.org  (it is simpler to use the .pkg file) or/and update it using:   6- In terminal enter:  sudo port upgrade outdated   7- Enter in terminal:  sudo port install libpng   8- In R, enter: install.packages(pkgs=" http://www.rforge.net/src/contrib/png_0.1-8.tar.gz", repos=NULL)     Done