def to_int32(f):
    """
    Convert an image to an int32 image.

    img = to_int32(f)

    `to_int32` clips the input image between the values -2147483648 and
    2147483647 and converts it to the signed 32-bit datatype.

    Parameters
    ----------
    f : Any image

    Returns
    -------
    img : The converted image
    """
    from numpy import int32, asanyarray
    return asanyarray(f).astype(int32)
