Feature #1320: Better error messages for image operations