Better error handling for image resizing. refs #3379