Skip to content

Commit

Permalink
fix readme exaple error (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
BubbleKID authored Apr 21, 2021
1 parent 54dcb07 commit 9df4dd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ This example shows how to use the library to correct the orientation of an image
.. code-block:: python
import exifread
from Pillow import Image
from PIL import Image
import logging
def _read_img_and_correct_exif_orientation(path):
im = Image.open(path)
Expand All @@ -170,6 +171,7 @@ This example shows how to use the library to correct the orientation of an image
tags = exifread.process_file(f, details=False)
if "Image Orientation" in tags.keys():
orientation = tags["Image Orientation"]
logging.basicConfig(level=logging.DEBUG)
logging.debug("Orientation: %s (%s)", orientation, orientation.values)
val = orientation.values
if 5 in val:
Expand Down

0 comments on commit 9df4dd6

Please sign in to comment.