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
11 changes: 11 additions & 0 deletions format1.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ def generate(self):
y += line_height

img.save('meme-' + img.filename.split(os.sep)[-1])
#size = 900, 400
logo = Image.open('opengenus_logo.png')
#nlogo=logo.size
#aratio=int(size[0]/nlogo[0])
#bratio=int(size[1]/nlogo[1])
nimg = logo.resize((90,30))
n=img.size
k=int(n[0] - 90)
g=int(n[1] - 35)
img.paste(nimg, ((k),(g)))
img.show()

11 changes: 11 additions & 0 deletions format2.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,15 @@ def generate(self):
y += line_height

img.save('meme-' + img.filename.split(os.sep)[-1])
#size = 900, 400
logo = Image.open('opengenus_logo.png')
#nlogo=logo.size
#aratio=int(size[0]/nlogo[0])
#bratio=int(size[1]/nlogo[1])
nimg = logo.resize((90,30))
n=img.size
k=int(n[0] - 90)
g=int(n[1] - 35)
img.paste(nimg, ((k),(g)))
img.show()

9 changes: 9 additions & 0 deletions format3.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,13 @@ def generate(self):
y += line_height

img.save('meme-' + img.filename.split(os.sep)[-1])
#size = 900, 400
logo = Image.open('opengenus_logo.png')
#nlogo=logo.size
nimg = logo.resize((90,30))
n=img.size
k=int(n[0] - 90)
g=int(n[1] - 35)
img.paste(nimg, ((k),(g)))
img.show()

11 changes: 11 additions & 0 deletions format4.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ def generate(self):

img.save('meme-{}{}.jpg'.format(os.path.basename(self.image1_path).split('.'
)[0], os.path.basename(self.image2_path).split('.')[0]))
#size = 900, 400
logo = Image.open('opengenus_logo.png')
#nlogo=logo.size
#aratio=int(size[0]/nlogo[0])
#bratio=int(size[1]/nlogo[1])
nimg = logo.resize((90,30))
n=img.size
k=int(n[0] - 90)
g=int(n[1] - 35)
img.paste(nimg, ((k),(g)))
img.show()

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.