MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DecodeGif

Function DecodeGif

tensorflow/go/op/wrappers.go:41515–41527  ·  view source on GitHub ↗

Decode the frame(s) of a GIF-encoded image to a uint8 tensor. GIF images with frame or transparency compression are not supported. On Linux and MacOS systems, convert animated GIFs from compressed to uncompressed by running: convert $src.gif -coalesce $dst.gif This op also supports decoding JPEGs

(scope *Scope, contents tf.Output)

Source from the content-addressed store, hash-verified

41513//
41514// Returns 4-D with shape `[num_frames, height, width, 3]`. RGB channel order.
41515func DecodeGif(scope *Scope, contents tf.Output) (image tf.Output) {
41516 if scope.Err() != nil {
41517 return
41518 }
41519 opspec := tf.OpSpec{
41520 Type: "DecodeGif",
41521 Input: []tf.Input{
41522 contents,
41523 },
41524 }
41525 op := scope.AddOperation(opspec)
41526 return op.Output(0)
41527}
41528
41529// Draw bounding boxes on a batch of images.
41530//

Callers 3

ComputeMethod · 0.85
ReadTensorFromImageFileFunction · 0.85
ReadTensorFromImageFileFunction · 0.85

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by

no test coverage detected