o
    i[	                     @  sN   d dl mZ d dlZd dlmZ d dlmZ G dd deZedd
dZdS )    )annotationsN)	lru_cache)
NamedTuplec                   @  sD   e Zd ZU dZded< ded< ded< ded< ded< dd
dZdS )ModeDescriptorzWrapper for mode strings.strmodeztuple[str, ...]bandsbasemodebasetypetypestrreturnc                 C  s   | j S )N)r   )self r   E/home/air/sos/back/venv/lib/python3.10/site-packages/PIL/ImageMode.py__str__   s   zModeDescriptor.__str__N)r   r   )__name__
__module____qualname____doc____annotations__r   r   r   r   r   r      s   
 r   r   r   r   c                 C  s   t jdkrdnd}i dddddddd	| d
fdddd| dfddddddddddddddddddd d!d"d#d$d%}| |v r]||  \}}}}t| ||||S d&d'd&d'd(d)| d*| d+d,d-d,d.d/d.d0}||  }t| d	dd|S )1z*Gets a mode descriptor for the given mode.little<>1)Lr   )r   z|b1r   )r   r   )r   |u1I)r   i4F)r   f4P)r    r   )r    r   RGB)r!   r   )RGBr   RGBX)r!   r   )r"   r#   r$   Xr   RGBA)r!   r   )r"   r#   r$   Ar   CMYK)r!   r   )CMYKr   YCbCr)r!   r   )r,   CbCrr   LAB)r!   r   )r   r(   r$   r   HSV)r!   r   )HSVr   RGBa)r!   r   )r"   r#   r$   ar   LA)r   r   )r   r(   r   La)r   r   )r   r7   r   PA)r!   r   )r    r(   r   z<u2z<i2z>u2z>i2u2i2z<u4z>u4z<i4z>i4)zI;16zI;16SzI;16LzI;16LSzI;16BzI;16BSzI;16NzI;16NSzI;32zI;32BzI;32LzI;32SzI;32BSzI;32LS)sys	byteorderr   )r   endianmodes	base_mode	base_typer   type_strmapping_modesr   r   r   getmode#   sl   	
rE   )r   r   r   r   )	
__future__r   r=   	functoolsr   typingr   r   rE   r   r   r   r   <module>   s   