parameters: (img)
return_statement: return layer
docstring: return a white-background-color image having the img in exact center
docstring_summary: return a white-background-color image having the img in exact center
docstring_tokens: return a white - background - color image having the img in exact center
function: def makeSquare(img):
    "return a white-background-color image having the img in exact center"
    size = (max(img.size),)*2
    layer = Image.new('RGB', size, (255,255,255,0))
    layer.paste(img, tuple(map(lambda x:(x[0]-x[1])//2, zip(size, img.size))))
    return layer
function_tokens: def makeSquare ( img ) : size = ( max ( img . size ) , ) * 2 layer = Image . new ( 'RGB' , size , ( 255 , 255 , 255 , 0 ) ) layer . paste ( img , tuple ( map ( lambda x : ( x [ 0 ] - x [ 1 ] ) // 2 , zip ( size , img . size ) ) ) ) return layer