def fromstring(mode, size, data, decoder_name="raw", *args):

    # may pass tuple instead of argument list
    if len(args) == 1 and isTupleType(args[0]):
        args = args[0]

    if decoder_name == "raw" and args == ():
        args = mode

    im = new(mode, size)
    im.fromstring(data, decoder_name, args)
    return im

##
# (New in 1.1.4) Creates an image memory from pixel data in a string
# or byte buffer.
# <p>
# This function is similar to {@link #fromstring}, but uses data in
# the byte buffer, where possible.  This means that changes to the
# original buffer object are reflected in this image).  Not all modes
# can share memory; supported modes include "L", "RGBX", "RGBA", and
# "CMYK".
# <p>
# Note that this function decodes pixel data only, not entire images.
# If you have an entire image file in a string, wrap it in a
# <b>StringIO</b> object, and use {@link #open} to load it.
# <p>
# In the current version, the default parameters used for the "raw"
# decoder differs from that used for {@link fromstring}.  This is a
# bug, and will probably be fixed in a future release.  The current
# release issues a warning if you do this; to disable the warning,
# you should provide the full set of parameters.  See below for
# details.
#
# @param mode The image mode.
# @param size The image size.
# @param data An 8-bit string or other buffer object containing raw
#     data for the given mode.
# @param decoder_name What decoder to use.
# @param *args Additional parameters for the given decoder.  For the
#     default encoder ("raw"), it's recommended that you provide the
#     full set of parameters:
#     <b>frombuffer(mode, size, data, "raw", mode, 0, 1)</b>.
# @return An Image object.
# @since 1.1.4
Load image from string
dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/win32/Python27/Lib/site-packages/PIL/Image.py/fromstring