File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/image/__pycache__/tiff.cpython-310.pyc
o
$we�( � @ s� d dl mZmZmZ d dlmZmZmZ d dlm Z G dd� de �Z
G dd� d�ZG dd � d �ZG d
d� d�Z
dd
� ZG dd� d�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdS )� )� MIME_TYPE�TIFF_FLD�TIFF_TAG)�
BIG_ENDIAN�
LITTLE_ENDIAN�StreamReader)�BaseImageHeaderc @ s4 e Zd ZdZedd� �Zedd� �Zedd� �ZdS ) �Tiffz`Image header parser for TIFF images.
Handles both big and little endian byte ordering.
c C s t jS )z[Return the MIME type of this TIFF image, unconditionally the string
``image/tiff``.)r �TIFF��self� r
�H/home/arjun/projects/env/lib/python3.10/site-packages/docx/image/tiff.py�content_type s zTiff.content_typec C � dS )z:Default filename extension, always 'tiff' for TIFF images.�tiffr
r r
r
r �default_ext s zTiff.default_extc C s0 t �|�}|j}|j}|j}|j}| ||||�S )zYReturn a |Tiff| instance containing the properties of the TIFF image in
`stream`.)�_TiffParser�parse�px_width� px_height�horz_dpi�vert_dpi)�cls�stream�parserr r r r r
r
r �from_stream s
zTiff.from_streamN) �__name__�
__module__�__qualname__�__doc__�propertyr r �classmethodr r
r
r
r r s
r c s| e Zd ZdZ� fdd�Zedd� �Zedd� �Zedd � �Z ed
d� �Z
edd
� �Zedd� �Zdd� Z
edd� �Z� ZS )r zkParses a TIFF image stream to extract the image properties found in its main
image file directory (IFD)c � t t| ��� || _d S �N)�superr �__init__�_ifd_entries)r �ifd_entries�� __class__r
r r&