.. Automatically generated file - do not modify.

.. function:: im.AlphaMask(base, mask, **properties)
    
    An image manipulator that takes two image manipulators, `base` and
    `mask`, as arguments. It replaces the alpha channel of `base` with
    the red channel of `mask`.
    
    This is used to provide an image's alpha channel in a second
    image, like having one jpeg for color data, and a second one
    for alpha. In some cases, two jpegs can be smaller than a
    single png file.
    
    Note that this takes different arguments from :func:`AlphaMask`,
    which uses the mask's alpha channel.

.. function:: im.Composite(size, *args, **properties)
    
    This image manipulator composites multiple images together to
    form a single image.
    
    The `size` should be a (width, height) tuple giving the size
    of the composed image.
    
    The remaining positional arguments are interpreted as groups of
    two. The first argument in a group should be an (x, y) tuple,
    while the second should be an image manipulator. The image
    produced by the image manipulator is composited at the location
    given by the tuple.
    
    ::
    
        image girl clothed happy = im.Composite(
            (300, 600),
            (0, 0), "girl_body.png",
            (0, 0), "girl_clothes.png",
            (100, 100), "girl_happy.png"
            )

.. function:: im.Crop(im, rect)
    
    An image manipulator that crops `rect`, a (x, y, width, height) tuple,
    out of `im`, an image manipulator.
    
    ::
    
        image logo crop = im.Crop("logo.png", (0, 0, 100, 307))

.. function:: im.FactorScale(im, width, height=None, bilinear=True, **properties)
    
    An image manipulator that scales `im` (a second image manipulator)
    to `width` times its original `width`, and `height` times its
    original height. If `height` is omitted, it defaults to `width`.
    
    If `bilinear` is true, then bilinear interpolation is used for
    the scaling. Otherwise, nearest neighbor interpolation is used.
    
    ::
    
        image logo doubled = im.FactorScale("logo.png", 1.5)

.. function:: im.Flip(im, horizontal=False, vertical=False, **properties)
    
    An image manipulator that flips `im` (an image manipulator)
    vertically or horizontally.  `vertical` and `horizontal` control
    the directions in which the image is flipped.
    
    ::
    
        image eileen flip = im.Flip("eileen_happy.png", vertical=True)

.. function:: im.Grayscale(im, **properties)
    
    An image manipulator that creates a desaturated version of the image
    manipulator `im`.

.. function:: im.Scale(im, width, height, bilinear=True, **properties)
    
    An image manipulator that scales `im` (an image manipulator) to
    `width` and `height`.
    
    If `bilinear` is true, then bilinear interpolation is used for
    the scaling. Otherwise, nearest neighbor interpolation is used.
    
    ::
    
        image logo scale = im.Scale("logo.png", 100, 150)

.. function:: im.Sepia(im, **properties)
    
    An image manipulator that creates a sepia-toned version of the image
    manipulator `im`.

.. function:: im.Tile(im, size=None, **properties)
    
    An image manipulator that tiles the image manipulator `im`, until
    it is `size`.
    
    `size`
        If not None, a (width, height) tuple. If None, this defaults to
        (:var:`config.screen_width`, :var:`config.screen_height`).

