예제 #1
0
def dump(codec_name, *args, **kws):
    """Save hex data to file.

    Parameters
    ----------
    codec_name: str
        Name of a registered codec.

    Returns
    -------
    bytes
    """

    registry.get(codec_name).Writer().dump(*args, **kws)
예제 #2
0
def load(codec_name, *args, **kws):
    """Load hex data from file.

    Parameters
    ----------
    codec_name: str
        Name of a registered codec.

    Returns
    -------
    class:`Image`
    """
    return registry.get(codec_name).Reader().load(*args, **kws)