code: def load_image(buf, request_components=0):
      
      x = ffi.new('int*')
      y = ffi.new('int*')
      n = ffi.new('int*')
  
      cbuf = ffi.from_buffer(buf)
  
      bitmap = lib.stbi_load_from_memory(
          ffi.cast('unsigned char*', cbuf), len(buf), x, y, n,
          request_components
      )
  
      pybuffer = ffi.buffer(bitmap, x[0]*y[0]*n[0])
  
      return pybuffer, x[0], y[0], n[0]
docs: Load a png or jpeg image into a bitmap buffer.
  
      Args:
          buf (Buffer): Buffer to load
          request_components (int): If you want to force number of components
  
      Returns:
  
          A tuple containing:
  
          - Bitmap buffer
          - width of bitmap
          - height of bitmap
          - number of components