# tensorflow::ops::DecodeAndCropJpeg::Attrs

`#include <image_ops.h>`

Optional attribute setters for [DecodeAndCropJpeg](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/decode-and-crop-jpeg#classtensorflow_1_1ops_1_1_decode_and_crop_jpeg).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1ade4565804d091b2ee9f3f71d7be3ffa2 = 1.0f` | `float` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1afe18a96df41f5b94c222496dc5206368 = 0` | `int64` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1ab6a1537364211645118c52ac8b3e530e = ""` | `StringPiece` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a96af21097f175c4dca629887cdb8acf4 = true` | `bool` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a09f5eb7adce68e4626c89ab197d0a9ce = 1` | `int64` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1ac266a7946265c4dc352d9d70e2259966 = false` | `bool` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a1b5661eb7517d6e8b0d137c216cde926(float x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs` The minimum required fraction of lines before a truncated input is accepted. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a9a3c06e5dbbb9e8e7c13b293b2403268(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs` Number of color channels for the decoded image. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a8d2f196496c30966160544ad10836e50(StringPiece x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs` string specifying a hint about the algorithm used for decompression. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1aee3e9244f85e8b65014b5e036c4f7c0a(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs` If true use a slower but nicer upscaling of the chroma planes (yuv420/422 only). |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1af03f99cbc3529d3f66d2c6c7b443216e(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs` Downscaling ratio. |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a34f9a484aaa2188fc26ac919ee441dbd(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs` If true try to recover an image from truncated input. |

## Public attributes

### acceptable_fraction_

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

### channels_

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

### dct_method_

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

### fancy_upscaling_

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

### ratio_

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

### try_recover_truncated_

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

## Public functions

### AcceptableFraction

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::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::DecodeAndCropJpeg::Attrs::Channels(
  int64 x
)
```
Number of color channels for the decoded image.

Defaults to 0

### DctMethod

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::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::DecodeAndCropJpeg::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::DecodeAndCropJpeg::Attrs::Ratio(
  int64 x
)
```
Downscaling ratio.

Defaults to 1

### TryRecoverTruncated

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::TryRecoverTruncated(
  bool x
)
```
If true try to recover an image from truncated input.

Defaults to false