Use Imagick's resize functionality if the extension is available