code: def byte_view(qimage, byteorder = 'little'):
      
      raw = _qimage_or_filename_view(qimage)
      result = raw.view(_np.uint8).reshape(raw.shape + (-1, ))
      if byteorder and byteorder != _sys.byteorder:
          result = result[...,::-1]
      return result
docs: Returns raw 3D view of the given QImage_'s memory.  This will
      always be a 3-dimensional numpy.ndarray with dtype numpy.uint8.
      
      Note that for 32-bit images, the last dimension will be in the
      [B,G,R,A] order (if little endian) due to QImage_'s memory layout
      (the alpha channel will be present for Format_RGB32 images, too).
  
      For 8-bit (indexed) images, the array will still be 3-dimensional,
      i.e. shape will be (height, width, 1).
  
      The order of channels in the last axis depends on the `byteorder`,
      which defaults to 'little', i.e. BGRA order.  You may set the
      argument `byteorder` to 'big' to get ARGB, or use None which means
      sys.byteorder here, i.e. return native order for the machine the
      code is running on.
  
      For your convenience, `qimage` may also be a filename, see
      `Loading and Saving Images`_ in the documentation.
  
      :param qimage: image whose memory shall be accessed via NumPy
      :type qimage: QImage_
      :param byteorder: specify order of channels in last axis
      :rtype: numpy.ndarray_ with shape (height, width, 1 or 4) and dtype uint8