tensorflow::ops::EncodeJpeg

#include <image_ops.h>

JPEG-encode an image.

Summary

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. Thechannelsdimension ofimagemust be 1. *rgb: Output an RGB JPEG image. Thechannelsdimension ofimage` must 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:

Arguments:

  • scope: A Scope object
  • image: 3-D with shape [height, width, channels].

Optional attributes (see Attrs):

Returns:

  • Output: 0-D. JPEG-encoded image.
Constructors and Destructors
EncodeJpeg(const ::tensorflow::Scope & scope, ::tensorflow::Input image)
EncodeJpeg(const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs)
Public attributes
contents
operation
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Public static functions
ChromaDownsampling(bool x)
DensityUnit(StringPiece x)
Format(StringPiece x)
OptimizeSize(bool x)
Progressive(bool x)
Quality(int64 x)
XDensity(int64 x)
XmpMetadata(StringPiece x)
YDensity(int64 x)
Structs
tensorflow::ops::EncodeJpeg::Attrs

Optional attribute setters for EncodeJpeg.

Public attributes

contents

::tensorflow::Output contents

operation

Operation operation

Public functions

EncodeJpeg

 EncodeJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input image
)

EncodeJpeg

 EncodeJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input image,
  const EncodeJpeg::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Public static functions

ChromaDownsampling

Attrs ChromaDownsampling(
  bool x
)

DensityUnit

Attrs DensityUnit(
  StringPiece x
)

Format

Attrs Format(
  StringPiece x
)

OptimizeSize

Attrs OptimizeSize(
  bool x
)

Progressive

Attrs Progressive(
  bool x
)

Quality

Attrs Quality(
  int64 x
)

XDensity

Attrs XDensity(
  int64 x
)

XmpMetadata

Attrs XmpMetadata(
  StringPiece x
)

YDensity

Attrs YDensity(
  int64 x
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/cc/class/tensorflow/ops/encode-jpeg