diff --git a/README.md b/README.md index d3ad36e5..bc943af5 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ apt-get install git subversion mercurial \ python-setuptools python-pip python-virtualenv ipython \ - python-dev python-imaging python-numpy python-psycopg2 \ + python-dev python-pil python-numpy python-psycopg2 \ python-geoip python-html5lib python-lxml \ postgresql postgresql-contrib rabbitmq-server \ poppler-utils mkvtoolnix gpac imagemagick \ diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 919180fc..148eb655 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -15,11 +15,11 @@ from distutils.spawn import find_executable from glob import glob import numpy as np -import Image import ox import ox.image from ox.utils import json from django.conf import settings +from PIL import Image img_extension = 'jpg' diff --git a/pandora/document/models.py b/pandora/document/models.py index 5527f50a..35e6cb16 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -11,7 +11,7 @@ from django.db.models import Max from django.contrib.auth.models import User from django.db.models.signals import pre_delete -import Image +from PIL import Image import ox from item.models import Item diff --git a/pandora/item/timelines.py b/pandora/item/timelines.py index 58897bcd..861ee1df 100644 --- a/pandora/item/timelines.py +++ b/pandora/item/timelines.py @@ -6,7 +6,7 @@ import math import os import re -import Image +from PIL import Image from ox.utils import json diff --git a/pandora/item/views.py b/pandora/item/views.py index 0b772572..e083caec 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -8,7 +8,7 @@ from urlparse import urlparse from urllib import quote import time -import Image +from PIL import Image from django.db.models import Count, Sum from django.http import HttpResponse, HttpResponseForbidden, Http404 from django.shortcuts import get_object_or_404, redirect, render diff --git a/pandora/sequence/extract.py b/pandora/sequence/extract.py index fd06c979..bbaa8418 100644 --- a/pandora/sequence/extract.py +++ b/pandora/sequence/extract.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 from __future__ import division -import Image import os +from PIL import Image + ZONE_INDEX = [] for pixel_index in range(64): x, y = pixel_index % 8, int(pixel_index / 8) diff --git a/scripts/item_icon.pandora.py b/scripts/item_icon.pandora.py index 7a3cafa6..26584d92 100755 --- a/scripts/item_icon.pandora.py +++ b/scripts/item_icon.pandora.py @@ -10,7 +10,7 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_ activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) -import Image +from PIL import Image from optparse import OptionParser import sys diff --git a/scripts/list_icon.pandora.py b/scripts/list_icon.pandora.py index eba0e5de..14be7692 100755 --- a/scripts/list_icon.pandora.py +++ b/scripts/list_icon.pandora.py @@ -10,8 +10,8 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_ activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) -import Image -import ImageDraw +from PIL import Image +from PIL import ImageDraw from optparse import OptionParser from ox.image import drawText, wrapText import sys diff --git a/scripts/poster.0xdb.py b/scripts/poster.0xdb.py index 83211d1f..1bb5df12 100755 --- a/scripts/poster.0xdb.py +++ b/scripts/poster.0xdb.py @@ -10,8 +10,8 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_ #activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') #execfile(activate_this, dict(__file__=activate_this)) -import Image -import ImageDraw +from PIL import Image +from PIL import ImageDraw import json from optparse import OptionParser import ox diff --git a/scripts/poster.arsenalberlin.py b/scripts/poster.arsenalberlin.py index 22a19d2d..28d80417 100755 --- a/scripts/poster.arsenalberlin.py +++ b/scripts/poster.arsenalberlin.py @@ -11,8 +11,8 @@ 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 diff --git a/scripts/poster.indiancinema.py b/scripts/poster.indiancinema.py index 64d39f50..79edc01c 100755 --- a/scripts/poster.indiancinema.py +++ b/scripts/poster.indiancinema.py @@ -10,8 +10,8 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_ activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) -import Image -import ImageDraw +from PIL import Image +from PIL import ImageDraw import json from optparse import OptionParser import ox diff --git a/scripts/poster.padma.py b/scripts/poster.padma.py index b7e7b8b9..292a8020 100755 --- a/scripts/poster.padma.py +++ b/scripts/poster.padma.py @@ -10,8 +10,8 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_ activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) -import Image -import ImageDraw +from PIL import Image +from PIL import ImageDraw import json from optparse import OptionParser import ox diff --git a/scripts/poster.pandora.py b/scripts/poster.pandora.py index ff7b1321..0d439a26 100755 --- a/scripts/poster.pandora.py +++ b/scripts/poster.pandora.py @@ -10,8 +10,8 @@ root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file_ activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) -import Image -import ImageDraw +from PIL import Image +from PIL import ImageDraw import json from optparse import OptionParser import ox diff --git a/vm/pandora_install.sh b/vm/pandora_install.sh index a7312279..3d36a996 100755 --- a/vm/pandora_install.sh +++ b/vm/pandora_install.sh @@ -54,9 +54,8 @@ apt-get install -y \ python-setuptools \ python-pip \ python-virtualenv \ - python-imaging \ python-dev \ - python-imaging \ + python-pil \ python-numpy \ python-psycopg2 \ python-pyinotify \