
    hi^                     F    d dl mZ ddlmZ ddlmZ  G d de          ZdS )    )Struct   )	MIME_TYPE)BaseImageHeaderc                   j    e Zd ZdZed             Zed             Zed             Zed             Z	dS )GifzImage header parser for GIF images.

    Note that the GIF format does not support resolution (DPI) information. Both
    horizontal and vertical DPI default to 72.
    c                 N    |                      |          \  }} | ||dd          S )zYReturn |Gif| instance having header properties parsed from GIF image in
        `stream`.H   )_dimensions_from_stream)clsstreampx_width	px_heights       f/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/docx/image/gif.pyfrom_streamzGif.from_stream   s2     "99&AA)s8YB///    c                     t           j        S )zUMIME content type for this image, unconditionally `image/gif` for GIF
        images.)r   GIFselfs    r   content_typezGif.content_type   s     }r   c                     dS )z8Default filename extension, always 'gif' for GIF images.gif r   s    r   default_extzGif.default_ext   s	     ur   c                     |                     d           |                    d          }t          d          }|                    |          \  }}||fS )N      z<HH)seekreadr   unpack)r   r   bytes_structr   r   s         r   r   zGif._dimensions_from_stream    sL    AQ$mmF33)""r   N)
__name__
__module____qualname____doc__classmethodr   propertyr   r   r   r   r   r   r   r      s          0 0 [0   X
   X # # [# # #r   r   N)r#   r   	constantsr   imager   r   r   r   r   <module>r,      so                      " " " " " "# # # # #/ # # # # #r   