Your IP : 52.14.234.146
U
e5d� � @ s2 d Z ddlmZ dgZd%dd�Zg Zdd� Ze�e� dd � Ze�e� d
d� Z e�e � dd
� Z
e�e
� dd� Ze�e� dd� Ze�e� dd� Z
e�e
� dd� Ze�e� dd� Ze�e� dd� Ze�e� dd� Ze�e� dd� Ze�e� dd� Ze�e� d d!� Zd"d#� Zed$k�r.e� dS )&z<Recognize image file formats based on their first few bytes.� )�PathLike�whatNc C s� d }zp|d krNt| ttf�r2t| d�}|�d�}n| �� }| �d�}| �|� tD ]}|||�}|rR| W �S qRW 5 |r�|� � X d S )N�rb� ) �close�
isinstance�strr �open�read�tell�seek�tests)�file�h�f�locationZtf�res� r �/usr/lib64/python3.8/imghdr.pyr s
c C s | dd� dkrdS dS )z JPEG data in JFIF or Exif format� �
)s JFIFs ExifZjpegNr �r r r r r � test_jpeg% s r c C s | � d�rdS d S )Ns �PNG
Zpng��
startswithr r r r �test_png, s
r c C s | dd� dkrdS dS )zGIF ('87 and '89 variants)Nr )s GIF87as GIF89aZgifr r r r r �test_gif2 s r c C s | dd� dkrdS dS )z-TIFF (can be in Motorola or Intel byte order)N� )s MMs IIZtiffr r r r r � test_tiff9 s r c C s | � d�rdS dS )zSGI image librarys �ZrgbNr r r r r �test_rgb@ s
r c C s<