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)
| 41513 | // |
| 41514 | // Returns 4-D with shape `[num_frames, height, width, 3]`. RGB channel order. |
| 41515 | func 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 | // |
no test coverage detected