from PIL import Image
from os.path import join, dirname, getmtime, exists, expanduser
from .config import *
from PIL import Image
from os.path import join, dirname, getmtime, exists, expanduser
from .config import *
library = expanduser('~/.image.so')
sauce = join(dirname(__file__), 'image.c')
if not exists(library) or getmtime(sauce) > getmtime(library):
library = expanduser('~/.image.so')
sauce = join(dirname(__file__), 'image.c')
if not exists(library) or getmtime(sauce) > getmtime(library):
height = int(float(h) * (float(width) / float(w)))
height //= 2
i = i.resize((width, height), Image.ANTIALIAS)
height = int(float(h) * (float(width) / float(w)))
height //= 2
i = i.resize((width, height), Image.ANTIALIAS)