pygame / doc / src / sdlimagebase.xml

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

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

  <func name="get_error">
    <call>get_error () -> pygame2.Error</call>
      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

      You will rarely need to call this function.
  <func name="load">
    <call>load (file[, type]) -> :class:``</call>
    <desc>Loads an image file and creates a :class:`` from it.
      Loads an image file and creates a
      :class:`` 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.

  <func name="read_xpm_from_array">
    <call>read_xpm_from_array (buffer) -> :class:``</call>
    <desc>Creates a :class:`` from a XPM buffer.
      Creates a :class:`` from a XPM
      buffer. The buffer can be any type that can be used as character