o
    >e
                     @  s@   d dl mZ d dlZd dlmZ G dd dZedd	d
ZdS )    )annotationsN)	lru_cachec                   @  s$   e Zd ZdZdddZdddZdS )ModeDescriptorzWrapper for mode strings.modestrbandstuple[str, ...]basemodebasetypetypestrreturnNonec                 C  s"   || _ || _|| _|| _|| _d S N)r   r   r	   r
   r   )selfr   r   r	   r
   r    r   N/var/www/html/humari/django-venv/lib/python3.10/site-packages/PIL/ImageMode.py__init__   s
   
zModeDescriptor.__init__c                 C  s   | j S r   )r   )r   r   r   r   __str__&   s   zModeDescriptor.__str__N)r   r   r   r   r	   r   r
   r   r   r   r   r   )r   r   )__name__
__module____qualname____doc__r   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!d$d%d&d'd(}| |v rc||  \}}}}t| ||||S d)d*d)d*d+d,|d- |d. d/d0d/d1d2d1d3}||  }t| d	dd|S )4z*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   zBGR;15)r#   r   )r&   r%   r$   r   zBGR;16zBGR;24LA)r   r   )r   r*   r   )r   r   )r   r9   r   )r#   r   )r"   r*   r   )LaPAz<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*   sv   	
rG   )r   r   r   r   )
__future__r   r?   	functoolsr   r   rG   r   r   r   r   <module>   s   