diff options
Diffstat (limited to 'tensorflow/core/ops/image_ops.cc')
-rw-r--r-- | tensorflow/core/ops/image_ops.cc | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tensorflow/core/ops/image_ops.cc b/tensorflow/core/ops/image_ops.cc index 81e7c5e1d2..5098c44437 100644 --- a/tensorflow/core/ops/image_ops.cc +++ b/tensorflow/core/ops/image_ops.cc @@ -441,9 +441,26 @@ contents: 0-D. PNG-encoded image. )doc"); // -------------------------------------------------------------------------- +REGISTER_OP("DecodeGif") + .Input("contents: string") + .Output("image: uint8") + .Doc(R"doc( +Decode the first frame of a GIF-encoded image to a uint8 tensor. + +GIF with frame or transparency compression are not supported +convert animated GIF from compressed to uncompressed by: + +convert $src.gif -coalesce $dst.gif + +contents: 0-D. The GIF-encoded image. +image: 4-D with shape `[num_frames, height, width, 3]`. RGB order +)doc"); + +// -------------------------------------------------------------------------- REGISTER_OP("RGBToHSV") - .Input("images: float") - .Output("output: float") + .Input("images: T") + .Output("output: T") + .Attr("T: {float, double} = DT_FLOAT") .SetShapeFn(ColorspaceShapeFn) .Doc(R"doc( Converts one or more images from RGB to HSV. @@ -462,8 +479,9 @@ output: `images` converted to HSV. // -------------------------------------------------------------------------- REGISTER_OP("HSVToRGB") - .Input("images: float") - .Output("output: float") + .Input("images: T") + .Output("output: T") + .Attr("T: {float, double} = DT_FLOAT") .SetShapeFn(ColorspaceShapeFn) .Doc(R"doc( Convert one or more images from HSV to RGB. |