'Loads this image with pixel data from a bytes object.
This method is similar to the :py:func:`~PIL.Image.frombytes` function,
but loads data into this image instead of creating a new image object.'

def frombytes(self, data, decoder_name='raw', *args):

    if ((len(args) == 1) and isinstance(args[0], tuple)):
        args = args[0]
    if ((decoder_name == 'raw') and (args == ())):
        args = self.mode
    d = _getdecoder(self.mode, decoder_name, args)
    d.setimage(self.im)
    s = d.decode(data)
    if (s[0] >= 0):
        raise ValueError('not    enough    image    data')
    if (s[1] != 0):
        raise ValueError('cannot    decode    image    data')
