Module Functions
----------------
.. function:: get_error () -> :exc:`pygame2.Error`

  Gets the last :exc:`pygame2.Error` occured.

  SDL_image maintains an internal error message. This message will
  usually be given to you when a :exc:`pygame2.Error` is
  raised.

  You will rarely need to call this function.



.. function:: load (file[, type]) -> :class:`pygame2.sdl.video.Surface`

  Loads an image file and creates a :class:`pygame2.sdl.video.Surface` from
  it.

  Loads an image file and creates a :class:`pygame2.sdl.video.Surface` from
  it. The *file* argument can be a file object or filename. *type* is an
  optional argument indicating the image type as string.

  .. note::

          The file object *must* support binary read and write
          access. This is especially important for Python 3.x users.




.. function:: read_xpm_from_array (buffer) -> :class:`pygame2.sdl.video.Surface`

  Creates a :class:`pygame2.sdl.video.Surface` from a XPM buffer.

  Creates a :class:`pygame2.sdl.video.Surface` from a XPM
  buffer. The *buffer* can be any type that can be used as character
  buffer.




