o
    shy
                     @  sZ   d dl mZ d dlZd dlm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)
NamedTuple   )	deprecatec                   @  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   a/var/www/html/construction_image-detection-poc/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!d$d%d&d'd(}| |v rn| d)v r^t| d* ||  \}}}}t| ||||S d+d,d+d,d-d.| d/| d0d1d2d1d3d4d3d5}||  }t| d	dd|S )6z*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   BGR;15)r#   r   )r&   r%   r$   r   BGR;16BGR;24LA)r   r   )r   r*   r   )r   r   )r   r9   r   )r#   r   )r"   r*   r   )LaPA)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   )r	   endianmodes	base_mode	base_typer
   type_strmapping_modesr   r   r   getmode%   sz   	

rK   )r	   r   r   r   )
__future__r   rC   	functoolsr   typingr   
_deprecater   r   rK   r   r   r   r   <module>   s   