class_docstr: Encode an image to PNG.
  
  This function is thread-safe, and has high performance when run in
  parallel. See `encode_png_benchmark.py` for details.
  
  Arguments:
    image: A numpy array of shape `[height, width, channels]`, where
      `channels` is 1, 3, or 4, and of dtype uint8.
  
  Returns:
    A bytestring with PNG-encoded data.
code: def __init__(self):
      super().__init__()
      self._image_placeholder = None
      self._encode_op = None
  
file_path: tensorboard/tensorboard/util/encoder.py
imports: import numpy
  from tensorboard.util import op_evaluator
label_desc: Use image node_id 1 to create a new _TensorFlowPngEncoder object from inherited base classes: op_evaluator with example: obj = _TensorFlowPngEncoder()