Fix TF image casting in test code (#939)
Fix TF image casting in test code (#939)

Casting image type using image specific function convert_image_dtype,
instead of casting generically.

Fixed by calling tf.image.convert_image_dtype to cast image.
saturate=True which ensures that output values are clipped into the
allowed range before performing a potentially dangerous cast.
tensorflow/tensorboard,tensorflow/tensorboard,qiuminxu/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard,tensorflow/tensorboard,qiuminxu/tensorboard,qiuminxu/tensorboard,tensorflow/tensorboard,qiuminxu/tensorboard,tensorflow/tensorboard,qiuminxu/tensorboard,qiuminxu/tensorboard