aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/api_def/base_api/api_def_DecodeJpeg.pbtxt
blob: b9521370d35050c37282adda774ac58f5e14effa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
op {
  graph_op_name: "DecodeJpeg"
  in_arg {
    name: "contents"
    description: <<END
0-D.  The JPEG-encoded image.
END
  }
  out_arg {
    name: "image"
    description: <<END
3-D with shape `[height, width, channels]`..
END
  }
  attr {
    name: "channels"
    description: <<END
Number of color channels for the decoded image.
END
  }
  attr {
    name: "ratio"
    description: <<END
Downscaling ratio.
END
  }
  attr {
    name: "fancy_upscaling"
    description: <<END
If true use a slower but nicer upscaling of the
chroma planes (yuv420/422 only).
END
  }
  attr {
    name: "try_recover_truncated"
    description: <<END
If true try to recover an image from truncated input.
END
  }
  attr {
    name: "acceptable_fraction"
    description: <<END
The minimum required fraction of lines before a truncated
input is accepted.
END
  }
  attr {
    name: "dct_method"
    description: <<END
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.)
END
  }
  summary: "Decode a JPEG-encoded image to a uint8 tensor."
  description: <<END
The attr `channels` indicates the desired number of color channels for the
decoded image.

Accepted values are:

*   0: Use the number of channels in the JPEG-encoded image.
*   1: output a grayscale image.
*   3: output an RGB image.

If needed, the JPEG-encoded image is transformed to match the requested number
of color channels.

The attr `ratio` allows downscaling the image by an integer factor during
decoding.  Allowed values are: 1, 2, 4, and 8.  This is much faster than
downscaling the image later.


This op also supports decoding PNGs and non-animated GIFs since the interface is
the same, though it is cleaner to use `tf.image.decode_image`.
END
}