# tensorflow::ops::DecodeJpeg::Attrs Struct Reference

# tensorflow::
ops::
DecodeJpeg::
Attrs

`
#include <image_ops.h>
`


Optional attribute setters for
[DecodeJpeg](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/decode-jpeg#classtensorflow_1_1ops_1_1_decode_jpeg)
.

## Summary

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a0b10d4d030a8ca14ac7570161190c83a = 1.0f ` | ` float ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a18e020f1e5ff8cfbd4d78478415d1ddb = 0 ` | ` int64 ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a56dbd1f5b3b6ad2f2f6109d261a1b2c0 = "" ` | ` StringPiece ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a8e1e67750ce05d148e582c0da4a2279e = true ` | ` bool ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a9e510e74b3307b51218f9ba73bb88299 = 1 ` | ` int64 ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1aa2cf39a88d8a81dcb7db8e5a5e0d370e = false ` | ` bool ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1ad1f15f47beae81c3372f7be5fc7b66d2 (float x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs ` The minimum required fraction of lines before a truncated input is accepted. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a0548d6add8de1fae308c6043ae78bc4f (int64 x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs ` Number of color channels for the decoded image. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a6e0f2e6e3603c3b5a4f87f99e01fb7f4 (StringPiece x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs ` string specifying a hint about the algorithm used for decompression. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a0ae0fb6313dea00cfcaa043461f9435f (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs ` If true use a slower but nicer upscaling of the chroma planes (yuv420/422 only). |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1abfd175cdcf500dba69dc39803e8fdebf (int64 x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs ` Downscaling ratio. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs_1a91511d57ca206a8096ab617a176fca3c (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/decode-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_jpeg_1_1_attrs ` If true try to recover an image from truncated input. |

## Public attributes

### acceptable_fraction_

```
float tensorflow::ops::DecodeJpeg::Attrs::acceptable_fraction_ = 1.0f
```

### channels_

```
int64 tensorflow::ops::DecodeJpeg::Attrs::channels_ = 0
```

### dct_method_

```
StringPiece tensorflow::ops::DecodeJpeg::Attrs::dct_method_ = ""
```

### fancy_upscaling_

```
bool tensorflow::ops::DecodeJpeg::Attrs::fancy_upscaling_ = true
```

### ratio_

```
int64 tensorflow::ops::DecodeJpeg::Attrs::ratio_ = 1
```

### try_recover_truncated_

```
bool tensorflow::ops::DecodeJpeg::Attrs::try_recover_truncated_ = false
```

## Public functions

### AcceptableFraction

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeJpeg::Attrs::AcceptableFraction(
  float x
)
```

The minimum required fraction of lines before a truncated input is accepted.


Defaults to 1

### Channels

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeJpeg::Attrs::Channels(
  int64 x
)
```

Number of color channels for the decoded image.


Defaults to 0

### DctMethod

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeJpeg::Attrs::DctMethod(
  StringPiece x
)
```

string specifying a hint about the algorithm used for decompression.


Defaults to "" which maps to a system-specific default. Currently valid values are \["INTEGER_FAST", "INTEGER_ACCURATE"\]. The hint may be ignored (e.g., the internal jpeg library changes to a version that does not have that specific option.)


Defaults to ""

### FancyUpscaling

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeJpeg::Attrs::FancyUpscaling(
  bool x
)
```

If true use a slower but nicer upscaling of the chroma planes (yuv420/422 only).


Defaults to true

### Ratio

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeJpeg::Attrs::Ratio(
  int64 x
)
```

Downscaling ratio.


Defaults to 1

### TryRecoverTruncated

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeJpeg::Attrs::TryRecoverTruncated(
  bool x
)
```

If true try to recover an image from truncated input.


Defaults to false