Converts an image of floats into a bit-cast 4-channel image of uint8s, which can be saved to disk.
x (array) – Input float image [batch_shape,h,w].
f (ml_framework, optional) – Machine learning library. Inferred from inputs if None.
The new encoded uint8 image [batch_shape,h,w,4] .