I needed a newer version of ImageMagick than is available on the yum packages on Amazon Linux. I tried using the remi repo but it failed with dependency errors. Here is what I did to install ImageMagick with support for PNG, JPG, and TIFF.
download the most recent package
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
uncomress the package
tar -vxf ImageMagick.tar.gz
install the devel packages for png, jpg, tiff. these are dependencies of ImageMagick
sudo yum -y install libpng-devel libjpeg-devel libtiff-devel
configure ImageMagick without X11. this is a server without a display (headless) so we don't need X11
cd ImageMagick
./configure --without-x
make && make install
mission complete.
If anyone doesn't wanna compile then you can follow this process to install it via rpm packages.
sudo yum install libpng-devel libjpeg-devel libtiff-devel libwebp-devel giflib-devel
Download these files
sudo yum install ImageMagick-c++-devel-7.0.10-0.x86_64.rpm ImageMagick-c++-7.0.10-0.x86_64.rpm ImageMagick-devel-7.0.10-0.x86_64.rpm ImageMagick-7.0.10-0.x86_64.rpm ImageMagick-libs-7.0.10-0.x86_64.rpm fribidi-1.0.2-1.el7.x86_64.rpm fribidi-devel-1.0.2-1.el7.x86_64.rpm
files can be downloaded from here
https://imagemagick.org/download/linux/CentOS/x86_64/
https://rpmfind.net/linux/rpm2html/search.php?query=fribidi*&submit=Search+...&system=centos&arch=