Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::EncodeJpeg::Attrs
#include <image_ops.h>
Optional attribute setters for EncodeJpeg.
Summary
Public functions
|
ChromaDownsampling(bool x)
|
|
DensityUnit(StringPiece x)
|
Unit used to specify x_density and y_density : pixels per inch ('in' ) or centimeter ('cm' ).
|
Format(StringPiece x)
|
Per pixel image format.
|
OptimizeSize(bool x)
|
If True, spend CPU/RAM to reduce size with no quality change.
|
Progressive(bool x)
|
If True, create a JPEG that loads progressively (coarse to fine).
|
Quality(int64 x)
|
Quality of the compression from 0 to 100 (higher is better and slower).
|
XDensity(int64 x)
|
Horizontal pixels per density unit.
|
XmpMetadata(StringPiece x)
|
If not empty, embed this XMP metadata in the image header.
|
YDensity(int64 x)
|
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"
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
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"
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
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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-11-15 UTC.
[null,null,["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::EncodeJpeg::Attrs Struct Reference\n\ntensorflow::ops::EncodeJpeg::Attrs\n==================================\n\n`#include \u003cimage_ops.h\u003e`\n\nOptional attribute setters for [EncodeJpeg](/api_docs/cc/class/tensorflow/ops/encode-jpeg#classtensorflow_1_1ops_1_1_encode_jpeg).\n\nSummary\n-------\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------------------|---------------|\n| [chroma_downsampling_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a3bb34c71aefd52e42a9b1aa4b432e6f7)` = true` | `bool` |\n| [density_unit_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ad473f931a23a1df4840975896b684184)` = \"in\"` | `StringPiece` |\n| [format_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a5ceef55471c0fad353271762846f6e78)` = \"\"` | `StringPiece` |\n| [optimize_size_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a65568fb0962da850389a89098f550966)` = false` | `bool` |\n| [progressive_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ac759c38a17868cbc2af1ae8778b29bd8)` = false` | `bool` |\n| [quality_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a4281376a8af08b15d19bc2764daf126a)` = 95` | `int64` |\n| [x_density_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ac2a312998c63610c614fa0394b41dc53)` = 300` | `int64` |\n| [xmp_metadata_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ac679a3e0a3e768adc7538f5b2aa4d319)` = \"\"` | `StringPiece` |\n| [y_density_](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a3ef30dc71da3a445598d940e9609c192)` = 300` | `int64` |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ChromaDownsampling](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a13b9ec4a7bab1d72fd3c0b57b7056f2b)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) See \u003chttp://en.wikipedia.org/wiki/Chroma_subsampling\u003e. |\n| [DensityUnit](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a6290e4f8249e42e91deea2f7e0a2111e)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) Unit used to specify `x_density` and `y_density`: pixels per inch (`'in'`) or centimeter (`'cm'`). |\n| [Format](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ae0b58eaebd511e6c6375c1e0f7821bd8)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) Per pixel image format. |\n| [OptimizeSize](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a27a061d0e31415fd10027bc490ed2631)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) If True, spend CPU/RAM to reduce size with no quality change. |\n| [Progressive](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1a4957bb2decc4e5e7e7cf9d20af36205e)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) If True, create a JPEG that loads progressively (coarse to fine). |\n| [Quality](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ac835e75cc50848e902fc1ba2b240a162)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) Quality of the compression from 0 to 100 (higher is better and slower). |\n| [XDensity](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1abd11bc13eae4b694f40ecd4d670eee8e)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) Horizontal pixels per density unit. |\n| [XmpMetadata](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1ae0b968290e4b22a90fda1612b09313c6)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) If not empty, embed this XMP metadata in the image header. |\n| [YDensity](#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs_1aba76539bfbaf2e7361710f632a630555)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/encode-jpeg/attrs#structtensorflow_1_1ops_1_1_encode_jpeg_1_1_attrs) Vertical pixels per density unit. |\n\nPublic attributes\n-----------------\n\n### chroma_downsampling_\n\n```scdoc\nbool tensorflow::ops::EncodeJpeg::Attrs::chroma_downsampling_ = true\n``` \n\n### density_unit_\n\n```scdoc\nStringPiece tensorflow::ops::EncodeJpeg::Attrs::density_unit_ = \"in\"\n``` \n\n### format_\n\n```scdoc\nStringPiece tensorflow::ops::EncodeJpeg::Attrs::format_ = \"\"\n``` \n\n### optimize_size_\n\n```scdoc\nbool tensorflow::ops::EncodeJpeg::Attrs::optimize_size_ = false\n``` \n\n### progressive_\n\n```scdoc\nbool tensorflow::ops::EncodeJpeg::Attrs::progressive_ = false\n``` \n\n### quality_\n\n```scdoc\nint64 tensorflow::ops::EncodeJpeg::Attrs::quality_ = 95\n``` \n\n### x_density_\n\n```scdoc\nint64 tensorflow::ops::EncodeJpeg::Attrs::x_density_ = 300\n``` \n\n### xmp_metadata_\n\n```scdoc\nStringPiece tensorflow::ops::EncodeJpeg::Attrs::xmp_metadata_ = \"\"\n``` \n\n### y_density_\n\n```scdoc\nint64 tensorflow::ops::EncodeJpeg::Attrs::y_density_ = 300\n``` \n\nPublic functions\n----------------\n\n### ChromaDownsampling\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::ChromaDownsampling(\n bool x\n)\n``` \nSee \u003chttp://en.wikipedia.org/wiki/Chroma_subsampling\u003e.\n\nDefaults to true \n\n### DensityUnit\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::DensityUnit(\n StringPiece x\n)\n``` \nUnit used to specify `x_density` and `y_density`: pixels per inch (`'in'`) or centimeter (`'cm'`).\n\nDefaults to \"in\" \n\n### Format\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::Format(\n StringPiece x\n)\n``` \nPer pixel image format.\n\nDefaults to \"\" \n\n### OptimizeSize\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::OptimizeSize(\n bool x\n)\n``` \nIf True, spend CPU/RAM to reduce size with no quality change.\n\nDefaults to false \n\n### Progressive\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::Progressive(\n bool x\n)\n``` \nIf True, create a JPEG that loads progressively (coarse to fine).\n\nDefaults to false \n\n### Quality\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::Quality(\n int64 x\n)\n``` \nQuality of the compression from 0 to 100 (higher is better and slower).\n\nDefaults to 95 \n\n### XDensity\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::XDensity(\n int64 x\n)\n``` \nHorizontal pixels per density unit.\n\nDefaults to 300 \n\n### XmpMetadata\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::XmpMetadata(\n StringPiece x\n)\n``` \nIf not empty, embed this XMP metadata in the image header.\n\nDefaults to \"\" \n\n### YDensity\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::EncodeJpeg::Attrs::YDensity(\n int64 x\n)\n``` \nVertical pixels per density unit.\n\nDefaults to 300"]]