HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/image/__pycache__/bmp.cpython-310.pyc
o

$weC�@s<ddlmZddlmZmZddlmZGdd�de�ZdS)�)�	MIME_TYPE)�
LITTLE_ENDIAN�StreamReader)�BaseImageHeaderc@s@eZdZdZedd��Zedd��Zedd��Ze	dd	��Z
d
S)�Bmpz#Image header parser for BMP images.c	CsTt|t�}|�d�}|�d�}|�d�}|�d�}|�|�}|�|�}|||||�S)z]Return |Bmp| instance having header properties parsed from the BMP image in
        `stream`.���&�*)rr�	read_long�_dpi)	�cls�stream�
stream_rdr�px_width�	px_height�horz_px_per_meter�vert_px_per_meter�horz_dpi�vert_dpi�r�G/home/arjun/projects/env/lib/python3.10/site-packages/docx/image/bmp.py�from_stream	s






zBmp.from_streamcCstjS)zUMIME content type for this image, unconditionally `image/bmp` for BMP
        images.)r�BMP��selfrrr�content_typeszBmp.content_typecCsdS)z8Default filename extension, always 'bmp' for BMP images.�bmprrrrr�default_ext szBmp.default_extcCs|dkrdStt|d��S)zkReturn the integer pixels per inch from `px_per_meter`, defaulting to 96 if
        `px_per_meter` is zero.��`g�
F%u�?)�int�round)�px_per_meterrrrr%szBmp._dpiN)�__name__�
__module__�__qualname__�__doc__�classmethodr�propertyrr�staticmethodrrrrrrs


rN)�	constantsr�helpersrr�imagerrrrrr�<module>s