implemented the gradient-convert -z option