o
    sÇh  ã                   @  sv   d dl mZ ddlmZmZmZ ddlmZ ddlm	Z
 dd
d„ZG dd„ dejƒZe ejee¡ e ejd¡ dS )é    )Úannotationsé   )ÚBmpImagePluginÚImageÚ	ImageFile)Úi16le)Úi32leÚprefixÚbytesÚreturnÚboolc                 C  s
   |   d¡S )Ns      )Ú
startswith)r	   © r   úf/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/PIL/CurImagePlugin.pyÚ_accept   s   
r   c                   @  s   e Zd ZdZdZddd„ZdS )	ÚCurImageFileÚCURzWindows Cursorr   ÚNonec           
      C  sì   | j  ¡ }| j  d¡}t|ƒsd}t|ƒ‚d}tt|dƒƒD ]}| j  d¡}|s+|}q|d |d kr=|d |d kr=|}q|sFd}t|ƒ‚|  t	|d	ƒ| ¡ | j
d | j
d d
 f| _| jd \}}}}	t |d| j
 ||	¡| jd< d S )Né   znot a CUR fileó    é   é   r   r   zNo cursors were foundé   é   )r   r   )ÚfpÚtellÚreadr   ÚSyntaxErrorÚrangeÚi16Ú	TypeErrorÚ_bitmapÚi32ÚsizeÚ_sizeÚtiler   Ú_Tile)
ÚselfÚoffsetÚsÚmsgÚmÚiÚdÚeÚoÚar   r   r   Ú_open(   s(   
 € zCurImageFile._openN)r   r   )Ú__name__Ú
__module__Ú__qualname__ÚformatÚformat_descriptionr1   r   r   r   r   r   $   s    r   z.curN)r	   r
   r   r   )Ú
__future__r   Ú r   r   r   Ú_binaryr   r   r   r"   r   ÚBmpImageFiler   Úregister_openr5   Úregister_extensionr   r   r   r   Ú<module>   s   
%