The tensor to draw on the canvas. Must match one of these shapes:
[height, width]: Drawn as grayscale.[height, width, 1]: Drawn as grayscale.[height, width, 3]: Drawn as RGB with alpha set in
imageOptions (defaults to 1, which is opaque).[height, width, 4]: Drawn as RGBA.The canvas to draw to.
Optionaloptions: DrawOptionsThe configuration arguments for image to be drawn and the canvas to draw to.
Draws a
tf.Tensorto a canvas.When the dtype of the input is 'float32', we assume values in the range [0-1]. Otherwise, when input is 'int32', we assume values in the range [0-255].