Add support for Imagick if present

Imagick is more memory efficient than GD but is not as available. This code adds support for Imagick if present which may prevent some out of memory errors especially when dealing with large images.