
    :h                        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Z G d dej                        Z ej                  ej                  ee        ej                   ej                  d	       y
)    )annotations   )BmpImagePluginImage	ImageFile)i16le)i32lec                $    | j                  d      S )Ns      )
startswith)prefixs    P/var/www/urcfiles/bundle/venv/lib/python3.12/site-packages/PIL/CurImagePlugin.py_acceptr      s    [))    c                      e Zd ZdZdZddZy)CurImageFileCURzWindows Cursorc                |   | j                   j                         }| j                   j                  d      }t        |      sd}t	        |      d}t        t        |d            D ]<  }| j                   j                  d      }|s|}#|d   |d   kD  s/|d   |d   kD  s;|}> |sd}t        |      | j                  t        |d	      |z          | j                  d   | j                  d   d
z  f| _        | j                  d   \  }}}}	t        j                  |d| j                  z   ||	      | j                  d<   y )N   znot a CUR filer         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as
             r   _openzCurImageFile._open(   s    GGLLOqz"Cc"" s1ay!AR A1!1! " )CC.  	SBZ&() YYq\499Q<1#44
YYq\
1a q&499*<aC		!r   N)returnNone)__name__
__module____qualname__formatformat_descriptionr0    r   r   r   r   $   s    F)Dr   r   z.curN)r   bytesr1   bool)
__future__r    r   r   r   _binaryr   r   r	   r!   r   BmpImageFiler   register_openr6   register_extensionr8   r   r   <module>rA      sd   $ # . . ! !*D>.. DJ   L''w ?   ,,f 5r   