JPEG-encode an image.
tf.raw_ops.EncodeJpeg(
    image,
    format='',
    quality=95,
    progressive=False,
    optimize_size=False,
    chroma_downsampling=True,
    density_unit='in',
    x_density=300,
    y_density=300,
    xmp_metadata='',
    name=None
)
image is a 3-D uint8 Tensor of shape [height, width, channels].
The attr format can be used to override the color format of the encoded
output.  Values can be:
- '': Use a default format based on the number of channels in the image.
- grayscale: Output a grayscale JPEG image.  The- channelsdimension
of- imagemust be 1.
- rgb: Output an RGB JPEG image. The- channelsdimension
of- imagemust be 3.
If format is not specified or is the empty string, a default format is picked
in function of the number of channels in image:
- 1: Output a grayscale image.
- 3: Output an RGB image.
| Args | 
|---|
| image | A Tensorof typeuint8.
3-D with shape[height, width, channels]. | 
| format | An optional stringfrom:"", "grayscale", "rgb". Defaults to"".
Per pixel image format. | 
| quality | An optional int. Defaults to95.
Quality of the compression from 0 to 100 (higher is better and slower). | 
| progressive | An optional bool. Defaults toFalse.
If True, create a JPEG that loads progressively (coarse to fine). | 
| optimize_size | An optional bool. Defaults toFalse.
If True, spend CPU/RAM to reduce size with no quality change. | 
| chroma_downsampling | An optional bool. Defaults toTrue.
See http://en.wikipedia.org/wiki/Chroma_subsampling. | 
| density_unit | An optional stringfrom:"in", "cm". Defaults to"in".
Unit used to specifyx_densityandy_density:
pixels per inch ('in') or centimeter ('cm'). | 
| x_density | An optional int. Defaults to300.
Horizontal pixels per density unit. | 
| y_density | An optional int. Defaults to300.
Vertical pixels per density unit. | 
| xmp_metadata | An optional string. Defaults to"".
If not empty, embed this XMP metadata in the image header. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| A Tensorof typestring. |