photobooth.py
def watermark(image):
    """ Apply a watermark to an image """
    mark = Image.open(watermark_img)
    im = Image.open(image)
    if im.mode != 'RGBA':
        im = im.convert('RGBA')
    layer = Image.new('RGBA', im.size, (0,0,0,0))
    position = (im.size[0] - mark.size[0], im.size[1] - mark.size[1])
    layer.paste(mark, position)
    outfile = join(out, basename(image))
    Image.composite(layer, im, layer).save(outfile)
    return outfile
 Apply a watermark to an image 
Apply a watermark to an image
Apply a watermark to an image
def watermark(image):
    mark = Image.open(watermark_img)
    im = Image.open(image)
    if im.mode != 'RGBA':
        im = im.convert('RGBA')
    layer = Image.new('RGBA', im.size, (0,0,0,0))
    position = (im.size[0] - mark.size[0], im.size[1] - mark.size[1])
    layer.paste(mark, position)
    outfile = join(out, basename(image))
    Image.composite(layer, im, layer).save(outfile)
    return outfile
def watermark ( image ) : mark = Image . open ( watermark_img ) im = Image . open ( image ) if im . mode != 'RGBA' : im = im . convert ( 'RGBA' ) layer = Image . new ( 'RGBA' , im . size , ( 0 , 0 , 0 , 0 ) ) position = ( im . size [ 0 ] - mark . size [ 0 ] , im . size [ 1 ] - mark . size [ 1 ] ) layer . paste ( mark , position ) outfile = join ( out , basename ( image ) ) Image . composite ( layer , im , layer ) . save ( outfile ) return outfile
Apply a watermark to an image
Apply a watermark to an image
""" Apply a watermark to an image """
image