class_docstr: Frame buffer object
  
  Parameters
  ----------
  color : RenderBuffer (optional)
      The color buffer to attach to this frame buffer
  depth : RenderBuffer (optional)
      The depth buffer to attach to this frame buffer
  stencil : RenderBuffer (optional)
      The stencil buffer to attach to this frame buffer
class_docstr_tok: ["Frame","buffer","object","Parameters","--","--","--","--","--","color",":","RenderBuffer","(","optional",")","The","color","buffer","to","attach","to","this","frame","buffer","depth",":","RenderBuffer","(","optional",")","The","depth","buffer","to","attach","to","this","frame","buffer","stencil",":","RenderBuffer","(","optional",")","The","stencil","buffer","to","attach","to","this","frame","buffer"]
docstr: Return array of pixel values in an attached buffer
  
  Parameters
  ----------
  mode : str
      The buffer type to read. May be 'color', 'depth', or 'stencil'.
  alpha : bool
      If True, returns RGBA array. Otherwise, returns RGB.
  crop : array-like
      If not None, specifies pixels to read from buffer.
      Format is (x, y, w, h).
  
  Returns
  -------
  buffer : array
      3D array of pixels in np.uint8 format.
      The array shape is (h, w, 3) or (h, w, 4), with the top-left
      corner of the framebuffer at index [0, 0] in the returned array if
      crop was not specified. If crop was given, the result will match
      the offset and dimensions of the crop.
docstr_tok: ["Return","array","of","pixel","values","in","an","attached","buffer","Parameters","--","--","--","--","--","mode",":","str","The","buffer","type","to","read",".","May","be","'color","'",",","'depth","'",",","or","'stencil","'",".","alpha",":","bool","If","True",",","returns","RGBA","array",".","Otherwise",",","returns","RGB",".","crop",":","array-like","If","not","None",",","specifies","pixels","to","read","from","buffer",".","Format","is","(","x",",","y",",","w",",","h",")",".","Returns","--","--","--","-","buffer",":","array","3D","array","of","pixels","in","np.uint8","format",".","The","array","shape","is","(","h",",","w",",","3",")","or","(","h",",","w",",","4",")",",","with","the","top-left","corner","of","the","framebuffer","at","index","[","0",",","0","]","in","the","returned","array","if","crop","was","not","specified",".","If","crop","was","given",",","the","result","will","match","the","offset","and","dimensions","of","the","crop","."]
code: def read(self, mode="color", alpha=True, crop=None):
      """Return array of pixel values in an attached buffer
  
      Parameters
      ----------
      mode : str
          The buffer type to read. May be 'color', 'depth', or 'stencil'.
      alpha : bool
          If True, returns RGBA array. Otherwise, returns RGB.
      crop : array-like
          If not None, specifies pixels to read from buffer.
          Format is (x, y, w, h).
  
      Returns
      -------
      buffer : array
          3D array of pixels in np.uint8 format.
          The array shape is (h, w, 3) or (h, w, 4), with the top-left
          corner of the framebuffer at index [0, 0] in the returned array if
          crop was not specified. If crop was given, the result will match
          the offset and dimensions of the crop.
  
      """
      _check_valid("mode", mode, ["color", "depth", "stencil"])
      buffer = getattr(self, mode + "_buffer")
      if buffer is None:
          raise ValueError(
              "Can't read pixels for buffer {}, "
              "buffer does not exist.".format(mode)
          )
      if crop is None:
          h, w = buffer.shape[:2]
          crop = (0, 0, w, h)
  
      # todo: this is ostensibly required, but not available in gloo.gl
      # gl.glReadBuffer(buffer._target)
      return read_pixels(crop, alpha=alpha, mode=mode)
  
imports: from .globject import GLObject
  from .texture import Texture2D
  from .wrappers import _check_valid, read_pixels
  from .context import get_current_canvas
label_desc: Use image node_id 15 for calling the FrameBuffer obj's underlying member method code with example usage: obj.read(mode, alpha, crop) and returns: read_pixels