tf.keras.utils.save_img

Saves an image stored as a NumPy array to a path or file object.

pathPath or file object.
xNumPy array.
data_formatImage data format, either "channels_first" or "channels_last".
file_formatOptional file format override. If omitted, the format to use is determined from the filename extension. If a file object was used instead of a filename, this parameter should always be used.
scaleWhether to rescale image values to be within [0, 255].
**kwargsAdditional keyword arguments passed to PIL.Image.save().