ó
¶qëcc           @   sŒ   y d  d l  m  Z Wn! e k
 r7 d  d l m Z n Xy d  d l m Z Wn e k
 rk d  d l Z n Xd  d l m Z e d „ Z	 d S(   iÿÿÿÿ(   t	   cStringIO(   t   BytesIO(   t   ImageN(   t   utilsc         K   ss   |  s
 d St  |  j ƒ  ƒ }  t j |  ƒ } y | j ƒ  Wn t k
 rL n X| j ƒ  | ro t j | ƒ } n  | S(   sõ   
    Try to open the source file directly using PIL, ignoring any errors.

    exif_orientation

        If EXIF orientation data is present, perform any required reorientation
        before passing the data along the processing pipeline.

    N(   R   t   readR   t   opent   loadt   IOErrorR   t   exif_orientation(   t   sourceR   t   optionst   image(    (    s   /Users/danaskwith/.local/share/virtualenvs/svtgbi-git-reqaUha4/lib/python2.7/site-packages/easy_thumbnails/source_generators.pyt	   pil_image   s    
(
   R    R   t   ImportErrort   django.utils.sixt   PILR   t   easy_thumbnailsR   t   TrueR   (    (    (    s   /Users/danaskwith/.local/share/virtualenvs/svtgbi-git-reqaUha4/lib/python2.7/site-packages/easy_thumbnails/source_generators.pyt   <module>   s   