Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/PIL/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/PIL/__pycache__/GimpPaletteFile.cpython-312.pyc

�

&ٜg���D�ddlmZddlZddlmZddlmZGd�d�Zy)�)�annotationsN)�IO�)�o8c�$�eZdZdZdZdd�Zdd�Zy)�GimpPaletteFilez'File handler for GIMP's palette format.�RGBc	�\�td�D�cgc]}t|�dz��}}|j�dddk7r
d}t|��td�D]�}|j�}|sn�t	j
d|�r�.t
|�dkDr
d}t|��ttt|j�dd��}t
|�dk7r
d	}t|��t|d
�t|d�zt|d�z||<��d
j|�|_
ycc}w)N���sGIMP Paletteznot a GIMP palette files\w+:|#�dzbad palette filezbad palette entryrr��)�ranger�readline�SyntaxError�re�match�len�tuple�map�int�split�
ValueError�join�palette)�self�fp�ir�msg�s�vs       �>/usr/local/lib/python3.12/site-packages/PIL/GimpPaletteFile.py�__init__zGimpPaletteFile.__init__s
��&+�C�j�1�j��2�a�5�1�9�j��1�
�;�;�=��"���0�+�C��c�"�"��s��A����
�A����x�x�
�A�&���1�v��|�(��!�#�&�&��c�#�q�w�w�y��!�}�-�.�A��1�v��{�)�� ��o�%��A�a�D��B�q��t�H�,�r�!�A�$�x�7�G�A�J�#�&�x�x��(����32s�D)c�2�|j|jfS)N)r�rawmode)rs r$�
getpalettezGimpPaletteFile.getpalette9s���|�|�T�\�\�)�)rN)rz	IO[bytes]�return�None)r)ztuple[bytes, str])�__name__�
__module__�__qualname__�__doc__r'r%r(�rr$rrs��1��G�)�8*rr)�
__future__rr�typingr�_binaryrrr/rr$�<module>r3s�� #�	���"*�"*r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists