def load_bmp(path):
        """Load a surface from a file.

        Args:
            path (str): Path to the BMP file to load.

        Returns:
            Surface: A surface containing the pixels loaded from the file.

        Raises:
            SDLError: If the file cannot be loaded.
        """
        surface = object.__new__(Surface)
        surface._ptr = check_ptr_err(lib.SDL_LoadBMP_RW(lib.SDL_RWFromFile(path, "rb"), 1))
        return surface
Load a surface from a file.

        Args:
            path (str): Path to the BMP file to load.

        Returns:
            Surface: A surface containing the pixels loaded from the file.

        Raises:
            SDLError: If the file cannot be loaded.