From 0981d3aea237de05447f2d40c2e3ea311b64c635 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Fri, 22 Oct 2010 19:50:44 +0200 Subject: [PATCH 1/1] =?utf8?q?Bugfixe=20:=20valeur=20par=20d=C3=A9faut=20q?= =?utf8?q?uand=20l'orientation=20n'est=20pas=20dispo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Photo.py | 2 +- TileSupport.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Photo.py b/Photo.py index 2161eaf..68b67f3 100755 --- a/Photo.py +++ b/Photo.py @@ -194,7 +194,7 @@ class Photo(Image, TileSupport, Metadata): def _rotateOrFlip(self, im) : orientation = self.tiffOrientation() - rotation, flip = TIFF_ORIENTATIONS[orientation] + rotation, flip = TIFF_ORIENTATIONS.get(orientation, (0, False)) if rotation : im = im.rotate(-rotation) if flip : diff --git a/TileSupport.py b/TileSupport.py index 905b0f4..1dd9c0f 100644 --- a/TileSupport.py +++ b/TileSupport.py @@ -92,7 +92,7 @@ class TileSupport : f = bf.open('r') orientation = self.tiffOrientation() - rotation, flip = TIFF_ORIENTATIONS[orientation] + rotation, flip = TIFF_ORIENTATIONS.get(orientation, (0, False)) if rotation and flip : tf = TemporaryFile(mode='w+') -- 2.20.1