def frombytes(mode, size, data, decoder_name='raw', *args):
 _check_size(size)
 if ((len(args) == 1) and isinstance(args[0], tuple)):
  args = args[0]
 if ((decoder_name == 'raw') and (args == ())):
  args = mode
 im = new(mode, size)
 im.frombytes(data, decoder_name, args)
 return im

def frombytes ( mode , size , data , decoder_name = 'raw' , * args ) : _check_size ( size ) if ( ( len ( args ) == 1 ) and isinstance ( args [ 0 ] , tuple ) ) : args = args [ 0 ] if ( ( decoder_name == 'raw' ) and ( args == ( ) ) ) : args = mode im = new ( mode , size ) im . frombytes ( data , decoder_name , args ) return im
creates a copy of an image memory from pixel data in a buffer .