tf.image.decode_jpeg(contents, channels=None, ratio=None, fancy_upscaling=None, try_recover_truncated=None, acceptable_fraction=None, name=None)
Decode a JPEG-encoded image to a uint8 tensor.
The attr channels indicates the desired number of color channels for the decoded image.
Accepted values are:
0: Use the number of channels in the JPEG-encoded image. 1: output a grayscale image. 3: output an RGB image.
If needed, the JPEG-encoded image is transformed to match the requested number of col