Little PHP script to resize images for resources with ImageMagick