o
    î6÷d›  ã                   @   s   d dl mZ G dd„ dƒZdS )é   )Úo8c                   @   s$   e Zd ZdZdZdd„ Zdd„ ZdS )ÚPaletteFilez-File handler for Teragon-style palette files.ÚRGBc           	      C   sÞ   dd„ t dƒD ƒ| _	 | ¡ }|snT|d d… dkrq
t|ƒdkr'd}t|ƒ‚d	d„ | ¡ D ƒ}z|\}}}}W n tyI   |\}}| }}Y nw d
|  krTdkren nt|ƒt|ƒ t|ƒ | j|< qd | j¡| _d S )Nc                 S   s   g | ]}|||f‘qS © r   )Ú.0Úir   r   úfC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\site-packages\PIL/PaletteFile.pyÚ
<listcomp>   s    z(PaletteFile.__init__.<locals>.<listcomp>é   Tr   ó   #éd   zbad palette filec                 S   s   g | ]}t |ƒ‘qS r   )Úint)r   Úxr   r   r   r	   &   s    é    éÿ   ó    )	ÚrangeÚpaletteÚreadlineÚlenÚSyntaxErrorÚsplitÚ
ValueErrorr   Újoin)	ÚselfÚfpÚsÚmsgÚvr   ÚrÚgÚbr   r   r   Ú__init__   s*   þízPaletteFile.__init__c                 C   s   | j | jfS )N)r   Úrawmode)r   r   r   r   Ú
getpalette2   s   zPaletteFile.getpaletteN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r#   r"   r$   r   r   r   r   r      s
    r   N)Ú_binaryr   r   r   r   r   r   Ú<module>   s   