W3cubDocs

/TensorFlow C++

tensorflow::ops::EncodeJpeg::Attrs

#include <image_ops.h>

Optional attribute setters for EncodeJpeg.

Summary

Public attributes
chroma_downsampling_ = true
bool
density_unit_ = "in"
StringPiece
format_ = ""
StringPiece
optimize_size_ = false
bool
progressive_ = false
bool
quality_ = 95
int64
x_density_ = 300
int64
xmp_metadata_ = ""
StringPiece
y_density_ = 300
int64
Public functions
ChromaDownsampling(bool x)
TF_MUST_USE_RESULT Attrs
DensityUnit(StringPiece x)
TF_MUST_USE_RESULT Attrs
Unit used to specify x_density and y_density: pixels per inch ('in') or centimeter ('cm').
Format(StringPiece x)
TF_MUST_USE_RESULT Attrs
Per pixel image format.
OptimizeSize(bool x)
TF_MUST_USE_RESULT Attrs
If True, spend CPU/RAM to reduce size with no quality change.
Progressive(bool x)
TF_MUST_USE_RESULT Attrs
If True, create a JPEG that loads progressively (coarse to fine).
Quality(int64 x)
TF_MUST_USE_RESULT Attrs
Quality of the compression from 0 to 100 (higher is better and slower).
XDensity(int64 x)
TF_MUST_USE_RESULT Attrs
Horizontal pixels per density unit.
XmpMetadata(StringPiece x)
TF_MUST_USE_RESULT Attrs
If not empty, embed this XMP metadata in the image header.
YDensity(int64 x)
TF_MUST_USE_RESULT Attrs
Vertical pixels per density unit.

Public attributes

chroma_downsampling_

bool tensorflow::ops::EncodeJpeg::Attrs::chroma_downsampling_ = true

density_unit_

StringPiece tensorflow::ops::EncodeJpeg::Attrs::density_unit_ = "in"

format_

StringPiece tensorflow::ops::EncodeJpeg::Attrs::format_ = ""

optimize_size_

bool tensorflow::ops::EncodeJpeg::Attrs::optimize_size_ = false

progressive_

bool tensorflow::ops::EncodeJpeg::Attrs::progressive_ = false

quality_

int64 tensorflow::ops::EncodeJpeg::Attrs::quality_ = 95

x_density_

int64 tensorflow::ops::EncodeJpeg::Attrs::x_density_ = 300

xmp_metadata_

StringPiece tensorflow::ops::EncodeJpeg::Attrs::xmp_metadata_ = ""

y_density_

int64 tensorflow::ops::EncodeJpeg::Attrs::y_density_ = 300

Public functions

ChromaDownsampling

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::ChromaDownsampling(
  bool x
)

DensityUnit

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::DensityUnit(
  StringPiece x
)

Unit used to specify x_density and y_density: pixels per inch ('in') or centimeter ('cm').

Defaults to "in"

Format

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::Format(
  StringPiece x
)

Per pixel image format.

Defaults to ""

OptimizeSize

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::OptimizeSize(
  bool x
)

If True, spend CPU/RAM to reduce size with no quality change.

Defaults to false

Progressive

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::Progressive(
  bool x
)

If True, create a JPEG that loads progressively (coarse to fine).

Defaults to false

Quality

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::Quality(
  int64 x
)

Quality of the compression from 0 to 100 (higher is better and slower).

Defaults to 95

XDensity

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::XDensity(
  int64 x
)

Horizontal pixels per density unit.

Defaults to 300

XmpMetadata

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::XmpMetadata(
  StringPiece x
)

If not empty, embed this XMP metadata in the image header.

Defaults to ""

YDensity

TF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::YDensity(
  int64 x
)

Vertical pixels per density unit.

Defaults to 300

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs.html