Skip to content

Commit 9712c86

Browse files
committed
no message
1 parent 1fc38cc commit 9712c86

File tree

3 files changed

+608
-608
lines changed

3 files changed

+608
-608
lines changed

comparison/comparison.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@
1313
intY = 436 - 64
1414

1515
objImages = [ {
16-
'strFile': 'official - caffe.png',
17-
'strText': 'official - Caffe'
16+
'strFile': 'official - caffe.png',
17+
'strText': 'official - Caffe'
1818
}, {
19-
'strFile': 'this - pytorch.png',
20-
'strText': 'this - PyTorch'
19+
'strFile': 'this - pytorch.png',
20+
'strText': 'this - PyTorch'
2121
} ]
2222

2323
npyImages = []
2424

2525
for objImage in objImages:
26-
objOutput = PIL.Image.open(objImage['strFile']).convert('RGB')
26+
objOutput = PIL.Image.open(objImage['strFile']).convert('RGB')
2727

28-
for intU in [ intShift - 10 for intShift in range(20) ]:
29-
for intV in [ intShift - 10 for intShift in range(20) ]:
30-
if math.sqrt(math.pow(intU, 2.0) + math.pow(intV, 2.0)) <= 5.0:
31-
PIL.ImageDraw.Draw(objOutput).text((intX + intU, intY + intV), objImage['strText'], (255, 255, 255), PIL.ImageFont.truetype('freefont/FreeSerifBold.ttf', 32))
32-
# end
33-
# end
34-
# end
28+
for intU in [ intShift - 10 for intShift in range(20) ]:
29+
for intV in [ intShift - 10 for intShift in range(20) ]:
30+
if math.sqrt(math.pow(intU, 2.0) + math.pow(intV, 2.0)) <= 5.0:
31+
PIL.ImageDraw.Draw(objOutput).text((intX + intU, intY + intV), objImage['strText'], (255, 255, 255), PIL.ImageFont.truetype('freefont/FreeSerifBold.ttf', 32))
32+
# end
33+
# end
34+
# end
3535

36-
PIL.ImageDraw.Draw(objOutput).text((intX, intY), objImage['strText'], (0, 0, 0), PIL.ImageFont.truetype('freefont/FreeSerifBold.ttf', 32))
36+
PIL.ImageDraw.Draw(objOutput).text((intX, intY), objImage['strText'], (0, 0, 0), PIL.ImageFont.truetype('freefont/FreeSerifBold.ttf', 32))
3737

38-
npyImages.append(numpy.array(objOutput))
38+
npyImages.append(numpy.array(objOutput))
3939
# end
4040

4141
moviepy.editor.ImageSequenceClip(sequence=npyImages, fps=1).write_gif(filename='comparison.gif', program='ImageMagick', opt='optimizeplus')

0 commit comments

Comments
 (0)