+
    TjS
                     F    R t ^ RIt^ RIt^ RIHt  ! R R]4      tRR ltR# )zO
Utility functions for handling images.

Requires Pillow as you might imagine.
N)Filec                   J   a  ] tR t^t o Rt]R 4       t]R 4       tR tRt	V t
R# )	ImageFilezt
A mixin for use alongside django.core.files.base.File, which provides
additional features for dealing with images.
c                0    V P                  4       ^ ,          # )    _get_image_dimensionsselfs   &M/var/www/idalgo/venv/lib/python3.14/site-packages/django/core/files/images.pywidthImageFile.width       ))+A..    c                0    V P                  4       ^,          # )   r   r	   s   &r   heightImageFile.height   r   r   c                    \        V R 4      '       g.   V P                  pV P                  4        \        WR7      V n        V P                  # )_dimensions_cache)close)hasattrclosedopenget_image_dimensionsr   )r
   r   s   & r   r   ImageFile._get_image_dimensions   s;    t011KKEIIK%9$%LD"%%%r   )r   N)__name__
__module____qualname____firstlineno____doc__propertyr   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s<     
 / / / /& &r   r   c                   ^ RI Hp VP                  4       p\        V R4      '       d%   T pVP	                  4       pVP                  ^ 4       M \        V R4      pRp Rp VP                  V4      pV'       g   Mo VP                  V4       TP                   '       dA   TP                   P"                  T'       d   TP%                  4        # TP                  X4       # T^,          pK  RV'       d   VP%                  4        # VP                  X4       #   \         d    Ru # i ; i  \        P                   d4   pTP                  ^ ,          P                  R4      '       d    Rp?Lh Rp?i\        P                   d     L\         d     ELi ; i  T'       d   TP%                  4        i TP                  X4       i ; i)	z
Return the (width, height) of an image, given an open file or a path. Set
'close' to True to close the file at the end if it is initially in an open
state.
)r   readrbNTi   zError -5)NN)PILr   Parserr   tellseekr   OSErrorr&   feedzliberrorargs
startswithstructRuntimeErrorimagesizer   )	file_or_pathr   PillowImageFilepfilefile_pos
chunk_sizedataes	   &&       r   r   r   #   se    1 A|V$$99;		!	 d+D #  
99Z(Dt" wwwww|| JJLIIh !OJJJLIIhM  	 	  ::  66!9''
33<<     JJLIIhs   D F 9F ;D( F F F D%$D%(F=(E+%F *E++FFF FFF FF ,G)F)r    r2   r.   django.core.filesr   r   r    r   r   <module>r@      s&      "& &,6 r   