Decode the first frame of a BMP-encoded image to a uint8 tensor. 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 BMP-encoded image. * 3: output an RGB image. * 4: output an RGBA image. Arg
(scope *Scope, contents tf.Output, optional ...DecodeBmpAttr)
| 33811 | // |
| 33812 | // Returns 3-D with shape `[height, width, channels]`. RGB order |
| 33813 | func DecodeBmp(scope *Scope, contents tf.Output, optional ...DecodeBmpAttr) (image tf.Output) { |
| 33814 | if scope.Err() != nil { |
| 33815 | return |
| 33816 | } |
| 33817 | attrs := map[string]interface{}{} |
| 33818 | for _, a := range optional { |
| 33819 | a(attrs) |
| 33820 | } |
| 33821 | opspec := tf.OpSpec{ |
| 33822 | Type: "DecodeBmp", |
| 33823 | Input: []tf.Input{ |
| 33824 | contents, |
| 33825 | }, |
| 33826 | Attrs: attrs, |
| 33827 | } |
| 33828 | op := scope.AddOperation(opspec) |
| 33829 | return op.Output(0) |
| 33830 | } |
| 33831 | |
| 33832 | // Computes natural logarithm of x element-wise. |
| 33833 | // |
no test coverage detected