§
    2?ÄjØ
  ã                   óz   — d Z ddlZddlZddlmZ  G d„ de¦  «        Z G d„ de¦  «        Z G d	„ d
e¦  «        ZdS )zD
PIL-based formats to take screenshots and grab from the clipboard.
é    Né   )ÚFormatc                   ó\   ‡ — e Zd ZdZdZdZˆ fd„Zd„ Zd„ Z G d„ de	j
        ¦  «        Z
ˆ xZS )	ÚBaseGrabFormatzBase format for grab formats.FNc                 óx   •—  t          t          | ¦  «        j        |i |¤Ž t          j        ¦   «         | _        d S ©N)Úsuperr   Ú__init__Ú	threadingÚRLockÚ_lock)ÚselfÚargsÚkwargsÚ	__class__s      €úEC:\Projects\Historical\venv\Lib\site-packages\imageio/plugins/grab.pyr
   zBaseGrabFormat.__init__   s8   ø€ Ø,��n˜dÑ#Ô#Ô,¨dÐ=°fÐ=Ð=Ð=Ý”_Ñ&Ô&ˆŒ
ˆ
ˆ
ó    c                 ó   — dS )NF© ©r   Úrequests     r   Ú
_can_writezBaseGrabFormat._can_write   s   € Øˆur   c                 ó  — | j         5  | j        sUd| _        dd l}t          |d¦  «        st	          d¦  «        ‚	 ddlm} n# t          $ r Y d d d ¦  «         d S w xY w|| _        d d d ¦  «         n# 1 swxY w Y   | j        S )NTr   Ú__version__z(Imageio Pillow requires Pillow, not PIL!)Ú	ImageGrab)r   Ú_pillow_importedÚPILÚhasattrÚImportErrorr   Ú
_ImageGrab)r   r   r   s      r   Ú_init_pillowzBaseGrabFormat._init_pillow   s  € ØŒZð 	,ð 	,ØÔ(ð 
,Ø(,�Ô%Ø�
�
�
å˜s MÑ2Ô2ð UÝ%Ð&SÑTÔTÐTð Ø-Ð-Ð-Ð-Ð-Ð-Ð-øÝ"ð  ð  ð  Øð	,ð 	,ð 	,ñ 	,ô 	,ð 	,ð 	,ð 	,ð øøøà"+�”ð	,ð 	,ð 	,ñ 	,ô 	,ð 	,ð 	,ð 	,ð 	,ð 	,ð 	,øøøð 	,ð 	,ð 	,ð 	,ð ŒÐs4   ˆ2A1»AÁA1Á
AÁA1ÁAÁ
A1Á1A5Á8A5c                   ó    — e Zd Zd„ Zd„ Zd„ ZdS )úBaseGrabFormat.Readerc                 ó   — d S r   r   ©r   s    r   Ú_openzBaseGrabFormat.Reader._open)   ó   € ØˆDr   c                 ó   — d S r   r   r%   s    r   Ú_closezBaseGrabFormat.Reader._close,   r'   r   c                 ó6   — | j                              |¦  «        S r   )ÚformatÚ	_get_data)r   Úindexs     r   r,   zBaseGrabFormat.Reader._get_data/   s   € Ø”;×(Ò(¨Ñ/Ô/Ð/r   N)Ú__name__Ú
__module__Ú__qualname__r&   r)   r,   r   r   r   ÚReaderr#   (   sA   € € € € € ð	ð 	ð 	ð	ð 	ð 	ð	0ð 	0ð 	0ð 	0ð 	0r   r1   )r.   r/   r0   Ú__doc__r   r    r
   r   r!   r   r1   Ú__classcell__)r   s   @r   r   r      s“   ø€ € € € € Ø'Ð'àÐØ€Jð'ð 'ð 'ð 'ð 'ðð ð ðð ð ð0ð 0ð 0ð 0ð 0�”ñ 0ô 0ð 0ð 0ð 0ð 0ð 0r   r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚScreenGrabFormata  The ScreenGrabFormat provided a means to grab screenshots using
    the uri of "<screen>".

    This functionality is provided via Pillow. Note that "<screen>" is
    only supported on Windows and OS X.

    Parameters for reading
    ----------------------
    No parameters.
    c                 ó^   — |j         dk    rdS t          |                      ¦   «         ¦  «        S )Nz<screen>F©ÚfilenameÚboolr!   r   s     r   Ú	_can_readzScreenGrabFormat._can_read?   s/   € ØÔ˜zÒ)Ð)Ø�5Ý�D×%Ò%Ñ'Ô'Ñ(Ô(Ð(r   c                 ó’   — |                       ¦   «         }|sJ ‚|                     ¦   «         }|€J ‚t          j        |¦  «        }|i fS r   )r!   ÚgrabÚnpÚasarray©r   r-   r   Úpil_imÚims        r   r,   zScreenGrabFormat._get_dataD   sQ   € Ø×%Ò%Ñ'Ô'ˆ	ØÐÐˆyà—’Ñ!Ô!ˆØÐ!Ð!Ð!ÝŒZ˜ÑÔˆØ�2ˆvˆr   N©r.   r/   r0   r2   r:   r,   r   r   r   r5   r5   3   s<   € € € € € ð	ð 	ð)ð )ð )ð
ð ð ð ð r   r5   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚClipboardGrabFormata(  The ClipboardGrabFormat provided a means to grab image data from
    the clipboard, using the uri "<clipboard>"

    This functionality is provided via Pillow. Note that "<clipboard>" is
    only supported on Windows.

    Parameters for reading
    ----------------------
    No parameters.
    c                 ó^   — |j         dk    rdS t          |                      ¦   «         ¦  «        S )Nz<clipboard>Fr7   r   s     r   r:   zClipboardGrabFormat._can_readZ   s/   € ØÔ˜}Ò,Ð,Ø�5Ý�D×%Ò%Ñ'Ô'Ñ(Ô(Ð(r   c                 ó¬   — |                       ¦   «         }|sJ ‚|                     ¦   «         }|€t          d¦  «        ‚t          j        |¦  «        }|i fS )Nz5There seems to be no image data on the clipboard now.)r!   ÚgrabclipboardÚRuntimeErrorr=   r>   r?   s        r   r,   zClipboardGrabFormat._get_data_   sc   € Ø×%Ò%Ñ'Ô'ˆ	ØÐÐˆyà×(Ò(Ñ*Ô*ˆØˆ>ÝØJñô ð õ ŒZ˜ÑÔˆØ�2ˆvˆr   NrB   r   r   r   rD   rD   N   s<   € € € € € ð	ð 	ð)ð )ð )ð

ð 
ð 
ð 
ð 
r   rD   )	r2   r   Únumpyr=   Úcorer   r   r5   rD   r   r   r   ú<module>rK      sÄ   ððð ð Ð Ð Ð à Ð Ð Ð à Ð Ð Ð Ð Ð ð$0ð $0ð $0ð $0ð $0�Vñ $0ô $0ð $0ðNð ð ð ð �~ñ ô ð ð6ð ð ð ð ˜.ñ ô ð ð ð r   