PIL: Support systems with Pillow and without

Fixes for systems with Pillow, but leaves a "try: except ImportError" to
support anything that doesn't have a PIL top level import.

Signed-off-by: Alon Levy <alon@pobox.com>
This commit is contained in:
Alon Levy
2013-04-08 11:19:56 +03:00
parent 519bcfb0e6
commit d0e9f843e2
8 changed files with 34 additions and 11 deletions

View File

@@ -15,7 +15,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import Image
try:
from PIL import Image
except ImportError:
import Image
from mediagoblin.tools.exif import exif_fix_image_orientation, \
extract_exif, clean_exif, get_gps_data, get_useful