Handle ImageMagick errors more gracefully, in particular when Photoshop does not pass a straight number for the DPI