%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/PIL/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/PIL/__pycache__/IptcImagePlugin.cpython-312.pyc

�

��e���2�ddlmZddlmZddlmZddlmZmZddl	m
Zddl	mZ
ddlmZd	d
d�Zdd�Zdd
�Zdd�Zdd�Zdd�ZGd�dej�Zej.ej0e�ej2ej0d�d�Zy)�)�annotations)�BytesIO)�Sequence�)�Image�	ImageFile)�i16be)�i32be)�	deprecate�raw�jpeg)r�c�V�|dk(r
tdd�ydt�d|�d�}t|��)N�PADzIptcImagePlugin.PAD��zmodule 'z' has no attribute '�')r�__name__�AttributeError)�name�msgs  �5/usr/lib/python3/dist-packages/PIL/IptcImagePlugin.py�__getattr__rs7���u�}��'��,���X�J�2�4�&��
:�C�
��
��c�$�td|zdd�S)Nr���)�i32��cs r�_ir *s����a����%�&�&rc�0�t|t�r|S|dS�Nr)�
isinstance�intrs r�_i8r%.s���1�c�"�1�,��!��,rc�0�tdd�t|�S)�.. deprecated:: 10.2.0zIptcImagePlugin.ir)rr rs r�ir(2s��
�!�2�&�
�a�5�Lrc�p�tdd�|D]}tdt|�zd���t�y)r'zIptcImagePlugin.dumprz%02x� )�endN)r�printr%)rr(s  r�dumpr-8s3��
�$�b�)�
�(��
�f�s�1�v�o�3�'�(�	�Grc�2�eZdZdZdZdd�Zd	d�Zd
d�Zd�Zy)�
IptcImageFile�IPTCzIPTC/NAAc�2�t|j|�S)N)r �info)�self�keys  r�getintzIptcImageFile.getintIs���$�)�)�C�.�!�!rc�l�|jjd�}|jd�sy|d|df}|ddk7s|ddvr
d	}t|��|d
}|dkDr
d}t	|��|d
k(rd}||fS|d
kDr+t|jj|d
z
��}||fSt
|d
�}||fS)Nr�r"r�r�)
rr8��r����	��zinvalid IPTC/NAA filer:�z%illegal field length in IPTC/NAA file�)�fp�read�strip�SyntaxError�OSErrorr �i16)r3�s�tagr�sizes     r�fieldzIptcImageFile.fieldLs���
�G�G�L�L��O���w�w�w�����d�A�a�D�j��
�Q�4�4�<�3�q�6�)I�I�)�C��c�"�"���t���#�:�9�C��#�,��
�S�[��D��D�y���C�Z��d�g�g�l�l�4�#�:�.�/�D��D�y���q�!�9�D��D�y�rc��	|jj�}|j�\}}|r|dk(rn�|r|jj|�}nd}||jvr[t|j|t�r|j|j|�n.|j||g|j|<n||j|<��|jdd}|jdd}d|jvr|jdddz
}nd}|dk(r
|sd|_n#|dk(r
|rd||_n|d	k(r|r
d
||_|jd�|jd�f|_
	t|jd
�}|dk(rdd|jz||fg|_yy#t$r}	d}
t|
�|	�d}	~	wwxYw)N�r>�
)r:�<rr)r:�A�Lr:�RGBr;�CMYK)r:�)r:�)r:�xzUnknown IPTC image compression�iptc)rr)rC�tellrLrDr2r#�list�append�_moder5�_size�COMPRESSION�KeyErrorrGrK�tile)r3�offsetrJrK�tagdata�layers�	component�id�compression�ers           r�_openzIptcImageFile._openhs�����W�W�\�\�^�F��
�
��I�C���#��.����'�'�,�,�t�,�����d�i�i���d�i�i��n�d�3��I�I�c�N�)�)�'�2�&*�i�i��n�g�%>�D�I�I�c�N�!(��	�	�#���$���7�#�A�&���I�I�g�&�q�)�	��d�i�i�����7�#�A�&��*�B��B��Q�;�y��D�J�
�q�[�Y��r��D�J�
�q�[�Y����D�J��[�[��)�4�;�;�w�+?�?��
�	&�%�d�k�k�(�&;�<�K��'�>� �&�4�9�9�"4�f�k�J�K�D�I����	&�2�C��#�,�A�%��	&�s�4F,�,	G�5G�Gc���t|j�dk7s|jdddk7rtjj|�S|jddd\}}|jj|�t
�}|dk(r|jd|jz�	|j�\}}|dk7rnS|dkDrM|jjt|d��}|sn%|j|�|t|�z}|dkDr�M�ltj|�5}|j�|j|_ddd�y#1swYyxYw)	NrrrXr8rs
P5
%d %d
255
rNi )�lenr`r�loadrC�seekr�writerKrLrD�minr�open�im)r3rarf�o�typerKrI�_ims        rrkzIptcImageFile.load�s-���t�y�y�>�Q��$�)�)�A�,�q�/�V�";��&�&�+�+�D�1�1�"�i�i��l�1�2�.���������V��
�I���%��
�G�G�'�$�)�)�3�4������J�D�$��w�����(��G�G�L�L��T�4��1��������
���A������(�	��Z�Z��]�	�c��H�H�J��f�f�D�G�	�	�	�s�,"E�E N)r4ztuple[int, int]�returnr$)rtz"tuple[tuple[int, int] | None, int])rt�None)	r�
__module__�__qualname__�format�format_descriptionr5rLrhrk�rrr/r/Es#��
�F�#��"��8-L�^rr/z.iimc�\�ddlm}m}d}t|t�r|j
St||j�r/|j
jd�}|rL|jd�}n:t||j�r$	|jj|j}|�yGd�d�}|�}t|_i|_t|�|_	|j#�|j
S#ttf$rY�dwxYw#t$tf$rY|j
SwxYw)z�
    Get IPTC information from TIFF, JPEG, or IPTC file.

    :param im: An image containing IPTC data.
    :returns: A dictionary containing IPTC information, or None if
        no IPTC information block was found.
    r)�JpegImagePlugin�TiffImagePluginN�	photoshopic��eZdZy)�getiptcinfo.<locals>.FakeImageN)rrvrwrzrr�	FakeImager��s��rr�)�r|r}r#r/r2�
JpegImageFile�get�
TiffImageFilerJrb�IPTC_NAA_CHUNKrr_�	__class__rrCrh�
IndexError)rpr|r}�datar~r�s      r�getiptcinfor��s
��3��D��"�m�$��w�w��	�B��5�5�	6��G�G�K�K��,�	���=�=��(�D�	�B��5�5�	6�	��6�6�>�>�/�"@�"@�A�D��|��
�
�
��B� �B�L��B�G��D�M�B�E�
�
���
��7�7�N��-��)�	��	��&
��!�
��
�7�7�N�
�s$�#C9�D�9D�
D�D+�*D+N)r�strrt�bytes)rr�rtr$)rzint | bytesrtr$)rzSequence[int | bytes]rtru)�
__future__r�ior�typingrr�rr�_binaryr	rHr
r�
_deprecaterr^rr r%r(r-r/�
register_openrx�register_extensionr�rzrr�<module>r�s���"#����!�!�!��F�#���'�-���m�I�'�'�m�`����M�(�(�-�8������-�-�v�6�1r

Zerion Mini Shell 1.0