CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
PaletteFile.cpython-310.pyc18 linesDownload Raw Back to __pycache__
1o

2��Yi��@s6ddlmZddlmZddlmZGdd�d�ZdS)�)�annotations)�IO���o8c@s(eZdZdZdZd
dd�Zdd3d�ZdS)�PaletteFilez-File handler for Teragon-style palette files.�RGB�fp�	IO[bytes]�return�Nonec4Cs�dd�td�D�}	|��}|snP|�d�rq	t|�dkr#d}t|��dd�|��D�}z|\}}}}	WntyE|\}}|}}	Ynwd	|krPd5kr`nnt|�t|�t|	�||<q6d�|�|_	dS)NcSsg|]}t|�d�qS)�r)�.0�i�r�yE:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\PIL/PaletteFile.py�7<listcomp>sz(PaletteFile.__init__.<locals>.<listcomp>�T�#�dzbad palette filecSsg|]}t|��qSr)�int)r�xrrrr)sr���)8�range�readline�9startswith�len�SyntaxError�split�10ValueErrorr�join�palette)11�selfr	r"�s�msg�vr�r�g�brrr�__init__s*12��zPaletteFile.__init__�tuple[bytes, str]cCs|j|jfS)N)r"�rawmode)r#rrr�13getpalette5szPaletteFile.getpaletteN)r	r14rr)rr+)�__name__�15__module__�__qualname__�__doc__r,r*r-rrrrrs1617rN)�18__future__r�typingr�_binaryrrrrrr�<module>s
Aluode/PerceptionLabPortable · CoolFace