use python3
This commit is contained in:
parent
63256ba8ad
commit
e50a7fa659
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# GPL 2010 <j@mailb.org>
|
# GPL 2010 <j@mailb.org>
|
||||||
|
@ -9,7 +9,7 @@ from optparse import OptionParser
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -43,14 +43,14 @@ if __name__ == '__main__':
|
||||||
width = int(int(opts.size) * (float(width) / height))
|
width = int(int(opts.size) * (float(width) / height))
|
||||||
height = int(opts.size)
|
height = int(opts.size)
|
||||||
width = width - width % 2
|
width = width - width % 2
|
||||||
ox = abs(height - width) / 2
|
ox = int(abs(height - width) / 2)
|
||||||
oy = 0
|
oy = 0
|
||||||
else:
|
else:
|
||||||
height = int(int(opts.size) * (float(height) / width))
|
height = int(int(opts.size) * (float(height) / width))
|
||||||
width = int(opts.size)
|
width = int(opts.size)
|
||||||
height = height - height % 2
|
height = height - height % 2
|
||||||
ox = 0
|
ox = 0
|
||||||
oy = abs(height - width) / 2
|
oy = int(abs(height - width) / 2)
|
||||||
|
|
||||||
frame = frame.resize((width, height), Image.ANTIALIAS)
|
frame = frame.resize((width, height), Image.ANTIALIAS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue