Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added data/opengenus_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions meme_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ def use(formatObj):
meme_with_logo.save(meme_with_logo.filename)
meme_with_logo.show()

def add_logo_opaque(image):
logo = Image.open('opengenus_logo.png')
size= logo.size
nimg = logo.resize((int(size[0]/4),int(size[1]/4)))
n=image.size
k=int((n[0]-int(size[0]/4)))
g=int((n[1]-int(size[1]/4)))
image.paste(nimg, ((k),(g)))
return image


# Adds logo image and text to a meme
def add_logo(img):
img = add_logo_img(img, 'data/OpenGenus.png')
Expand Down
Binary file added opengenus_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.