From 9b832317215f85dac721cc4e3bd10795e64cd678 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 14 Dec 2017 17:13:48 +0000 Subject: [PATCH] PIL fixes --- scripts/poster.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/poster.py b/scripts/poster.py index f908dec..9aa4646 100755 --- a/scripts/poster.py +++ b/scripts/poster.py @@ -1,18 +1,12 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 from __future__ import division import os - -root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) - -# using virtualenv's activate_this.py to reorder sys.path -#activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') -#execfile(activate_this, dict(__file__=activate_this)) - import hashlib -import Image -import ImageDraw + +from PIL import Image +from PIL import ImageDraw import json from optparse import OptionParser import ox @@ -20,6 +14,7 @@ from ox.image import drawText, getRGB, getTextSize, wrapText import subprocess import sys +root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) static_root = os.path.join(os.path.dirname(__file__), 'data') def get_frame(id, height, position):