Link Search Menu Expand Document

DecodeGif


tensorflow C++ API

tensorflow::ops::DecodeGif

Decode the first frame of a GIF-encoded image to a uint8 tensor.


Summary

GIF with frame or transparency compression are not supported convert animated GIF from compressed to uncompressed by:

convert $src.gif -coalesce $dst.gif

This op also supports decoding JPEGs and PNGs, though it is cleaner to usetf.image.decode_image.

Arguments:

  • scope: A Scope object
  • contents: 0-D. The GIF-encoded image.

Returns:

  • Output: 4-D with shape[num_frames, height, width, 3]. RGB order

Constructor

  • DecodeGif(const ::tensorflow::Scope & scope, ::tensorflow::Input contents) .

Public attributes

  • tensorflow::Output image.

DecodeGif block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_image_ops.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • contents : connect Input node.

Return:

  • Output image: Output object of DecodeGif class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method