Source

pygame / doc / src / sdlimagebase.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE module SYSTEM "api.dtd">

<module name="pygame2.sdlimage.base">
  <alias>pygame2.sdlimage</alias>
  <short>basic SDL_image wrapper module</short>
  <desc>
    Basic SDL_image wrapper module
  </desc>

  <func name="get_error">
    <call>get_error () -> pygame2.Error</call>
    <desc>
      Gets the last :exc:`pygame2.base.Error` occured.

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

      You will rarely need to call this function.
    </desc>
  </func>
  <func name="load">
    <call>load (file[, type]) -> :class:`pygame2.sdl.video.Surface`</call>
    <desc>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.

    </desc>
  </func>
  <func name="read_xpm_from_array">
    <call>read_xpm_from_array (buffer) -> :class:`pygame2.sdl.video.Surface`</call>
    <desc>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.
    </desc>
  </func>
</module>